如何更改图像映射区域元素样式 [英] How change image map area element style

查看:94
本文介绍了如何更改图像映射区域元素样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网页和iPad应用上使用图片地图。图像映射上的每个区域是一个可点击的元素,使声音,我可以轻松地用jQuery做。但是我没有能够改变样式,像显示边框,或者更改填充颜色只是为了指示该区域被点击。如果有人这样做,请让我知道;

I'm using image map on my web page and iPad app. Each area on the image map is a clickable element to make sound, which I can do easily with jQuery. But I haven't been able to change the style, like either showing the border, or change the fill color just to indicate that the area is clicked. If anybody has done this, please let me know; it seems simple, but I'm really stumped.

推荐答案

我得到它的工作感谢 James Treworgy的真棒ImageMaster Jquery插件

$('area').mousedown(function(e) {
   $(this).mapster('set',true);
});

$('area').mouseup(function(e) {
   $(this).mapster('set',false);
});

$('area').bind( "touchstart", function(e){
   $(this).mapster('set',true);
});

$('area').bind( "touchend", function(e){
   $(this).mapster('set',false);
});

这篇关于如何更改图像映射区域元素样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆