html - Select more than one Element jQuery -


i need select more 1 element in same page.

for example, this:

$("#administratorusername").mouseenter(function () {       $("#administratorusername").focus(); });  $("#administratorpassword").mouseenter(function () {       $("#administratorpassword").focus(); }); 

also need select label element apply same code.

ex: $("#administratorusername, label"), $("#administratorusername - label").

i don't know how it, , precisely question.

$('#administratorusername, #administratorpassword').mouseenter(function () {       $(this).focus(); }); 

that should work. note comma in between. have switch using object selected. hence change $(this).focus() opposed selecting again.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -