jquery - *[id^= Selects all, I'd like to select each same number -


With this code, when you hover anything with id = "trigger *", this id = " For panel 1 "trigger 1, for Trigger 1, For Trigger 2, I like this to show panel 2.

Is this possible? This is my code:

  $ (document) .ready (function () {hovered = false; $ ('* [id = = trigger]'). Bine ('mousecent mouseleave', Function (event) {switch (event.type) {When user enters div $ ('* [id ^ = panel]' {case 'mousecenter': // show ('sharp'); break; Mouseleave ': // addresses set timeout (function () (if (hovered) {$ (' * [id ^ = panel] '). (' Sharp ');}}, 250); break;}}); $ ('* [Id ^ = panel]'). Mouseover (function {hovered = true;}). Mouseout (function () {hovered = false; $ ('* [id = = trigger]') Trigger ("Mouseout");});});    

If I understand your needs, then you want to show the nearest panel to the triggers that were triggered .closest () Change this to:

  $ ('* [id ^ = panel]'). Show ('sharp');   
  $ (this) .closest ('* [id ^ = panel]') Show ('sharp');  < / Pre> 



Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -