Wednesday, August 11, 2010

Check if an element exists in jQuery

Check if an element exists in jQuery


Some times you need to check element in jQuery that is it exists or not

you can use listed below code:


if ($('#txtID).length) { 
        // put here your code 
    } 

No comments:

Post a Comment