if ( $("#test").length ) {
alert("element(s) found")
}
else {
alert("nothing found")
}
Friday, September 4, 2015
How to detect if a jQuery selector returns null?
Subscribe to:
Post Comments (Atom)
if ( $("#test").length ) {
alert("element(s) found")
}
else {
alert("nothing found")
}
No comments:
Post a Comment