This was palmToFace obvious once it occoured to me but due to the lack of Google results on the topic:
$("select#idOfElement").attr("selectedIndex")
Update, even better!
//see Dan's comment
$("#idOfElement").attr("selectedIndex")
This was palmToFace obvious once it occoured to me but due to the lack of Google results on the topic:
$("select#idOfElement").attr("selectedIndex")
Update, even better!
//see Dan's comment
$("#idOfElement").attr("selectedIndex")
A nice article on improving your jquery codez:
A co-worker recently shared an article by Josh Powell about how to use the jquery append() function much more efficiently. Thank goodness because today my JS requirements changed and I now had to build some html on keypress instead of onchange. The codez I was using was way too slow for this sort of mischief.
My take on the article is thus: Don’t create and append nested elements to nested elements to nested elements into your document. Instead build the HTML in a string and then append just one time. The article explains it quite well so I won’t rehash the whole thing. Check it out:
http://www.learningjquery.com/2009/03/43439-reasons-to-use-append-correctly
I file that one under “stuff I didn’t know I needed to know until days after I learned it”.
Hurrah! Life just got a little easier!
CFUniform – Easy, consistent, highly functional forms with validation, masking, and styles.
Don’t take my word for it, let Dan Wilson show you the way:
View the CFMeetup presentation: https://admin.na3.acrobat.com/_a204547676/p32015566/
jQuery UI is a HUGE timesaver when you need a solution to a common interface problem. Plug-ins make for easy addition of usability features like table sorting, searching, autocomplete, drag n drop, and tons more!
Picking out a jQuery plug-in can be a pain. Several different plug-ins to do the same job, which one do you choose?
Here are the tests that a plug-in has to pass to make it into my developer playbook:
Gahh… thats a lot of work to check all that stuff out for 10 different plugins. I thought jQuery made everything easy.
Drop me a comment! which jQuery plug-ins do use most frequently?