LazyTweet - Bringing the Lazyweb to Twitter so you can get answers to your burning questions
Active Questions
Recent Questions
Unanswered Questions
What is the best way to check for a non existing element. $('
#someidthatsnotindom
') == ?
#jquery
#lazyweb
phpgargoyle
(0) -
posted 1 year, 1 month ago
via Twitter
-
1 Reply
1 Answer
if ($('.myelement').length == 0) seems to be the most agreed approach.
philipnorton42
(0) -
1 year, 1 month ago
via Twitter
-
Add Comment
Leave a comment about @philipnorton42's answer
Post this comment to your Twitter account
Cancel comment
Would you like to answer?
Sign in with Twitter to post your answer:
Use Twitter to ask a question, just add "lazytweet" to a post and we'll take care of the rest. Read more about
how lazytweet works
.
Subscribe to the latest questions
Follow LazyTweet on Twitter
Tags
jquery
someidthatsnotindom
Related Posts
#lazyweb : What's the best #jquery plugin for pagination? Data is JSON.
Does anyone know if the :animated property picks up css3 transforms/transitions? #css3 #js #jquery #lazyweb
What's a good method for detecting if the browser is webkit? Ex: #webdev #lazyweb #javascript #jquery
#lazyweb What is the quickest to detect whether you're on a mobile browser with JavaScript? #js #jquery
Anyone encountered the onInitialized callback being called twice on an anythingSlider? #lazyweb #jquery // @chriscoyier