Reputation: 2721
I am now writing javascript code, and one of the statement is :if(($(this).find("option").filter(":selected").length > 0)
. On Chrome and Firefox, it is ok. but on ie8, it keeps telling me that 'syntax error', some guy can help me with this?
ps: because of my carelessness, i wrote an extra $, i modified the above code. now the problem is right now.
Upvotes: 0
Views: 58
Reputation: 25270
you are having one extra ($
if($($(this).find("option").filter(":selected").length > 0)
should be
if ( $(this).find("option").filter(":selected").length > 0 )
Upvotes: 3