About 50 results
Open links in new tab
  1. How can I check if an element exists in the visible DOM?

    As a result, checking the variable's value (the element) for existence will provide an unexpected result. The isNull function is my attempt to check for an elements existence from a variable, and it works, …

  2. javascript - How to find if element with specific id exists or not ...

    Mar 1, 2017 · 99 In my JavaScript I want to check whether the element with specific id is exist or not, I tried it with 2 ways 1).

  3. Check if object exists in JavaScript - Stack Overflow

    Nov 16, 2010 · If you restrict the question to check if an object exists, typeof o == "object" may be a good idea, except if you don't consider arrays objects, as this will also reported to be the type of …

  4. JavaScript check if variable exists (is defined/initialized)

    Feb 6, 2009 · JavaScript check if variable exists (is defined/initialized) Asked 14 years, 11 months ago Modified 3 years, 2 months ago Viewed 2.7m times

  5. javascript - How to wait until an element exists? - Stack Overflow

    I'm working on an Extension in Chrome, and I'm wondering: how do I find out when an element comes into existence? Using plain JavaScript, with an interval that checks until an element exists, or does

  6. javascript - The right way to check if an html element exist - Stack ...

    Sep 21, 2018 · What is the proper way to check if an html element exist in a webpage. I do like this:

  7. javascript - Check if element exists in jQuery - Stack Overflow

    Jan 4, 2011 · How do I check if an element exists if the element is created by .append() method? $('elemId').length doesn't work for me.

  8. How to check if a value exists in an object using JavaScript

    Mar 19, 2019 · 0 To check is value exists in each object key in javascript and want to return the object.

  9. javascript - Check if element exists - Stack Overflow

    Jul 31, 2011 · jQuery.fn.exists = function(){return jQuery(this).length>0;} This uses the same approach many here have suggested, but it also allows you to access whether or not an object exists like this:

  10. javascript - Check if an element is present in an array - Stack Overflow

    As of JULY 2018, this has been implemented in almost all major browsers, if you need to support an older browser a polyfill is available. Edit: Note that this returns false if the item in the array is an …