javascript domElement .is(cssSelector|":visible"|domElement)
javascript domElement .is( cssSelector|":visible"|domElement ) Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : return true if target element or first element of list is matched with selector other wise false . selector : any css selector string ":visible" : string for check is visible. Same as isVisible() method DomElement : matched with element if both are same then return true other wise false. Syntax: DOMElement.is( selector ) DOMNodeList.is( selector ) HTMLCollection.is( selector ) Usase: document.getElementById('firstDiv').is( "div" ) it return true if firstDiv element is div other wise false document.getElementsByTagName('div').is( ".FirstDiv" ) the getElementsByTagName selects all div but is() method check for only first div and if it has class Firstdiv then return true else false. document.getElements...