开发者

Simulate CSS hover state using jquery

开发者 https://www.devze.com 2023-01-04 03:55 出处:网络
I would like to know if there is a way that jquery or some other technology can listen for event X and then simulate a different event somewhere else.

I would like to know if there is a way that jquery or some other technology can listen for event X and then simulate a different event somewhere else.

The situation I have right now is that I have an image with an image map, and if the user hovers over a mapped ar开发者_C百科ea of the image map I want a related part of the content to change states ( in this case activate the hover state ).


$("#element").hover(function(){
  //style some element(s) or do stuff.
});

Keeping in mind all your content is client-side, otherwise make an AJAX request and assign accordingly.

0

精彩评论

暂无评论...
验证码 换一张
取 消