Linked Questions

138 questions linked to/from Is there an "exists" function for jQuery?
1500 votes
8 answers
1.8m views

How do I check if an element exists if the element is created by .append() method? $('elemId').length doesn't work for me.
Nick's user avatar
  • 16.1k
519 votes
11 answers
320k views

In Mootools, I'd just run if ($('target')) { ... }. Does if ($('#target')) { ... } in jQuery work the same way?
338 votes
3 answers
402k views

Yes, I know this has been asked a lot. But, it confuses me, since the results on google for this search show different methods (listed below) $(document).ready(function() { if ($('#DivID').length)...
31 votes
5 answers
47k views

Possible Duplicates: Is there an “exists” function for jQuery jQuery determining if element exists on page if(tr) is returning true when tr is not an element, how do I check whether ...
Ben's user avatar
  • 62.7k
28 votes
2 answers
11k views

Possible Duplicate: Is there an “exists” function for jQuery Say for instance you have the div: <div id="hello"></div> And you are dynamically creating a div: <div id="...
24 votes
3 answers
13k views

Wonder if there's any way to check if elements with the same class exists in a document. For example: <div class="panel">panel 1</div> <div class="panel">panel 2</div> <...
eozzy's user avatar
  • 69.4k
22 votes
3 answers
8k views

I have something like this: if (result.Indicator == 1) { $('#IndicatorImgDiv').append($('<img />').attr("src", "/Content/images/reddot.png")); } Now, this appends an image of a red dot ...
Kala J's user avatar
  • 2,060
33 votes
2 answers
1k views

I have the following code: <script type="text/javascript"> $(function () { $('#js-news').ticker({ speed: 0.10, ...
SamJolly's user avatar
  • 6,515
0 votes
1 answer
7k views

I am working on a simple program which lets users to add some text when clicking on add text button. However, when user clicks again on the "add Text" button, a new text area should not be added ...
Sai Varadula's user avatar
18 votes
2 answers
687 views

Possible Duplicate: Is there an “exists” function for jQuery <div class="XXX"> <div class="created"> </div> </div> div class="created" automatically ...
Anudeep GI's user avatar
7 votes
2 answers
3k views

I've been struggling with this simple script and could not find related problem here in StackOverflow. Here is my problem. I have two boxes. A box is highlighted with blue if <div class="...
0 votes
3 answers
4k views

I'm trying to check to see if an div called .errormsg exists and if it does then I don't want anything to happen but if it doesn't exist i want my form to redirect to a new URL after it. This is what ...
user3620201's user avatar
1 vote
2 answers
294 views

I am checking for string inside of a div element using jquery but it allways returns the if never the else even when the dom doesn't contain then $ what stupid mistake am i making? $('.bw-switcher')....
vimes1984's user avatar
  • 1,693
3 votes
4 answers
803 views

Possible Duplicate: Is there an “exists” function for jQuery Is there a better way to check if the element is already inserted on page? I'm currently doing this and is working fine, ...
0 votes
1 answer
2k views

I am creating these div's dynamically when user adds products to compare. //code in jquery var innerdiv='<div id="innerdiv'+value.code+'"'+'>'+value.name+'<img src="'+value.thumbnail+'"/>&...
ADIT's user avatar
  • 119

15 30 50 per page
1
2 3 4 5
...
10