Posts

Showing posts with the label hide

javascript : DomElement .fadeIn([duration],[callBack])

  javascript : DomElement .fadeIn( [duration],[callBack] ) Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : hide selected element/elements list with fade animation. duration : optional if not passed then default is 300ms. callBack :optional function executes when animation completes. Note: if callBack function is passed then after animation callback method will initiate. Syntax: DOMElement.fadeIn( [duration],[callBack] ) DOMNodeList.fadeIn( [duration],[callBack] ) HTMLCollection.fadeIn( [duration],[callBack] ) Usase: document.getElementById('firstDiv').fadeIn() it hides the div having id firstDiv with fade animation and return firstDiv element document.getElementsByTagName('div').fadeIn() the getElementsByTagName selects all div and fadeIn() method hides all divs with fade animation and return getElementsByTagName result for further processing you do not nee...

javascript : dom Elements .toggle()

  javascript : DomElements.toggle() Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : toggle element display style none. Note: after setting the style display of element/elements list it return itself for further processing. Syntax: DOMElement.toggle() DOMNodeList.toggle() HTMLCollection.toggle() Usase: document.getElementById('firstDiv').toggle() it hide/show the div having id firstDiv and return firstDiv element document.getElementsByTagName('div').toggle() the getElementsByTagName selects all div and toggle() method hide/show all divs and return getElementsByTagName result for further processing you do not need to execute selector again. document.getElementsByClassName('FirstDiv').toggle() the getElementsByClassName selects all div having class "FirstDiv" and toggle() method hide/show all divs and return getElementsByClassName result for ...

javascript : Dom Elements .hide()

  javascript : DomElements .hide() Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : set dom element style display none. Note: after setting the style display of element/elements list it return itself for further processing. Syntax: DOMElement.hide() DOMNodeList.hide() HTMLCollection.hide() Usase: document.getElementById('firstDiv').hide() it hides the div having id firstDiv and return firstDiv element document.getElementsByTagName('div').hide() the getElementsByTagName selects all div and hide() method hides all divs and return getElementsByTagName result for further processing you do not need to execute selector again. document.getElementsByClassName('FirstDiv').hide() the getElementsByClassName selects all div having class "FirstDiv" and hide() method hides all divs and return getElementsByClassName result for further processing you do no...