Posts

Showing posts with the label isvisible

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...

javascript : domElement .isVisible()

  javascript : domElement .isVisible() Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : return  true  if target element or first element of list is visible other wise  false . Syntax: DOMElement.isVisible() DOMNodeList.isVisible() HTMLCollection.isVisible() Usase: document.getElementById('firstDiv').isVisible() it return true if firstDiv element is visible other wise false document.getElementsByTagName('div').isVisible() the getElementsByTagName selects all div but isVisible() method check for only first div and if it is visible then return true else false. document.getElementsByClassName('FirstDiv').isVisible() the getElementsByClassName selects all div having class "FirstDiv" but isVisible() method consider only first element and return true if it is visible other wise false. document.getElementsByName('FirstDiv').isVisible() the ...