The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Guys, if I have multiple places with #info id, how to make it triggered only on hovered block, not to work it on all #info?
You can’t have multiple of the same ID’s on any page.
Make it a class instead and you should be set.
Guys, if I have multiple places with #info id …
You should not have multiple elements with the same id.
ids must be unique.
Consider using a class name instead.
how to make it triggered only on hovered block, not to work it on all
jQuery’s event functions bind the target element to the callback’s context, so the specific element that the event occurred on will be the value of this inside your callback function.
this; // the hovered element
$( this ); // the hovered element as a jQuery object
Forgot to say thank you guys! The main and the only thing about “id” i really forgot – uniqueness.