Foxhole Atheist
Monday, November 12, 2012
JQuery test for existance
if
($(
"#blah"
).length > 0) {
what confounds me is the following failed
if
($(
"#blah "
)[0].length > 0) {
just like JQuery will create an empty object with 0 length in case the object does not exist shouldn't it be referenced at [0]?
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment