Check For an Element on the Page with jQuery

Sometimes I write a function that I only want to apply to certain pages. Say, a form. I may need some javascript to apply to the form when I’m inserting and different javascript to apply when I’m editing. Since I’m reusing the form, I just change the id of the form and use this check: if ($(‘#insert-form’).length… Continue reading Check For an Element on the Page with jQuery