Archive for the ‘jQuery’ Category

Using JQuery to find the Selected Index of a Select Element

Thursday, May 7th, 2009

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")

Make JQuery Go Faster!

Tuesday, April 28th, 2009

A nice article on improving your jquery codez:

http://www.artzstudio.com/2009/04/jquery-performance-rules/

JQuery and Building HTML Elements Fast

Monday, April 13th, 2009

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”.

I like cfuniform!

Wednesday, March 4th, 2009

cflogoHurrah! 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/

What jQuery plug-in can you not live without?

Tuesday, February 3rd, 2009

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:

  1. Is it easy to use? It had better be, that is why I’m using jQuery in the first place!
  2. Is it easy to read the syntax? My code does not need any help being confusing. As Brain C. would say: “don’t make me think!”
  3. Are other developers using it? Peer support is very important in jQuery and you can’t get much help from your peers if they don’t use the plug-in.
  4. Has it been around for a while? The latest and greatest is not so great when it’s unheard of in 6 months
  5. Has it been updated recently? If the author/maintainer doesn’t care about the plug-in anymore, why should I?
  6. Is it > version 1.0? I don’t have time to beta test your plug-in right now. Maybe later?

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?