-
-
Recent Posts
Recent Comments
- caphun on Angular gotcha: ng-app=”myApp” (named applications)
- Melvina on Angular gotcha: ng-app=”myApp” (named applications)
- Get selected element's outer HTML | Easy jQuery | Free Popular Tips Tricks Plugins API Javascript and Themes on jQuery: outerHTML
- pacotole on jQuery: Textarea maxlength
- mani on How to get Fancybox 1.3.1 to stay put!
-
Oct22
Tip: getting values from an options list
So, if you’ve ever converted an options list into a single array of values you might have intuitively done this: var select = $(‘#mySelectElement’)[0]; var values = new Array(); for (var i=0; i < select.length; i++) { values.push(select.options[i].value); } Pretty boring aye? There is a snazzier (is that a word?) alternative, which is to use […]