Below is how you will able to know if a dom element exists 🙂 Quite simple!
[javascript]
if($("#dom").length > 0){
//dom exists
}else{
//dom doesn’t exists
}
[/javascript]
Below is how you will able to know if a dom element exists 🙂 Quite simple!
[javascript]
if($("#dom").length > 0){
//dom exists
}else{
//dom doesn’t exists
}
[/javascript]
by
Tags:
Thanks small and great! I will use “jQuery” rather then using the short version “$” because sometimes it conflicts with other javascript framework/library.
Leave a Reply