javascript - Change jquery mouseover to window mouseover -


i want change (which gets span name in table):

$('span').on('mouseover', function () {     if (this.id.match(/_zuserid/)) {         alert(this.id);     } } 

to use:

window.onmouseover=function(e) {     ...     ... } 

but couldn't figure out how span name e.target. don't know put after e.target span name.

here jsfiddle example.

window.onmouseover=function(e) {     if (e.target.id=='myspan') {         alert(e.target.id);     } } 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -