I'm working on a code with a lot of $(".blahblah").size()>0
conditions in it. I was wondering if there is a JQuery shorthand for it that eliminates the need to type >1
.
There is a suggestion here: http://forum.jquery.com/topic/selector-exists-would-be-a-nice-addition
Something like $(...).exists()
can be handy. Is there such a thing? I couldn't find it on the Internet and I was wondering if someone knows a trick or anyone from JQuery team who knows if such feature is planned to be added?
PS. I have read this: Is there an "exists" function for jQuery?