0
我是jQuery的新手,我有一個地圖highlight plugin,當鼠標移過一個區域時,我想更改帶有ID和文本的div文本我將從區域屬性得到它的ALT =「一些文本」使用jQuery,元數據和地圖突出顯示在Div中更改文本
下面是用於區域循環的代碼,我敢肯定,我可以在這裏添加一個小功能,但我不能弄明白。
//map
clicks$(".tabs area").click(function(){
//areas loop:
$(".tabs area").each(function(){
var d = $(this).data('maphilight') || {};
if(d.alwaysOn == true){
d.alwaysOn = false;
}
});
var data = $(this).data('maphilight') || {};
data.alwaysOn = true;
$(this).data('maphilight', data).trigger('alwaysOn.maphilight');
if ($(this).hasClass("current") == false)
{
var thisTarget = $(this).attr("href");
$(this).parents(".tabs").find('area.current').removeClass('current');
$(this).addClass('current');
$(this).parents(".tabs").nextAll(".tab-content").children(":visible").fadeOut(1, function() {
$(thisTarget).fadeIn("fast");
});
}
return false;
});
我如何能得到這個工作的任何幫助或建議將高度讚賞。
謝謝,我會嘗試並讓你知道。 – Sakhar 2011-05-09 19:18:02
它工作。非常感謝你兄弟:) – Sakhar 2011-05-09 19:27:25