check length of element jquery

this one can be good for checking if an element exists before doing something with it and can stop warning messages if you are running the script on multiple pages.

if ($('#mydivid').length) {
console.log('div found... ');


Other Items in js
Page Views

This page has been viewed 43 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.