Re: [jQuery] How to apply blur function to two classes?

2009-11-18 Thread Dhruva Sagar
The classes should be separated by a ',' (Comma). Please check out the documentation on Selectors, having spaces it looks for the second class within the first class sub-children. That's not what you desire. Try the following code : $(".numAdultsField, .numChildrenField").blur(function() {

[jQuery] How to apply blur function to two classes?

2009-11-18 Thread laredotorn...@zipmail.com
Hi, I have to apply an onblur function to elements of type "numAdultsField" or "numChildrenField". How do I do that? This isn't working ... $(".numAdultsField .numChildrenField").blur(function() { var id = $(this).attr("id"); var eltPrefix = id.substring(