Pro JavaScript Techniques by Ferguson Russ & Paxton John & Resig John

Pro JavaScript Techniques by Ferguson Russ & Paxton John & Resig John

Author:Ferguson, Russ & Paxton, John & Resig, John
Language: eng
Format: epub
ISBN: 978-1-4302-6391-3
Publisher: Apress
Published: 2015-06-23T16:00:00+00:00


function mouseOutHandler( e ) {

this.style.border = '0px';

e.stopPropagation();

}

// Locate, and traverse, all the elements in the DOM

var all = document.getElementsByTagName( '*' );

for ( var i = 0; i < all.length; i++ ) {

// Watch for when the user moves the mouse over the element

// and add a red border around the element

all[i].addEventListener( 'mouseover', mouseOverHandler );

// Watch for when the user moves back out of the element

// and remove the border that we added

all[i].addEventListener( 'mouseout', mouseOutHandler );



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.