My attempt @ blogging
My attempt @ blogging
Thursday, 21 April 2011
How to check whether an element exists using jQuery
There might be different ways of doing this. One is using the length property of jQuery selector as shown in the below code snippet
if ($("#elementid").length > 0){
// element exists, do something here
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment