Posts

Showing posts with the label opacity

javascript : domElement .fadeOut([duration],[callBack])

  javascript : domElement .fadeOut( [duration],[callBack] ) Target: Applicable with any DOM element. getElementById getElementsByTagName getElementsByClassName getElementsByName querySelector querySelectorAll Description : Shows 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.fadeOut( [duration],[callBack] ) DOMNodeList.fadeOut( [duration],[callBack] ) HTMLCollection.fadeOut( [duration],[callBack] ) Usase: document.getElementById('firstDiv').fadeOut() it shows the div having id firstDiv with fade animation and return firstDiv element document.getElementsByTagName('div').fadeOut() the getElementsByTagName selects all div and fadeOut() method shows all divs with fade animation and return getElementsByTagName result for further processing you do...

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