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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -