Pages
Home
React JS
React Native
SQL Server
C#.net
Interview
Videos
Angular
ASP.Net
AJAX
Contact Us
10 January 2014
How do you check if an element exists or not in jQuery?
Using jQuery length property, we can ensure whether element exists or not.
$(document).ready(function()
{
if ($('#element').length > 0)
{
//Element exists
});
});
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment