在我的项目中,您可以单击一个地区,它的县徽出现在底部。
我有一些 jquery 悬停在新添加的波峰上,我想在他们的类上使用选择器。每个波峰都添加了:
$("#selectResult").append("<div id='"+arr[this.id]+"' class='inline'></div>");
var addThis = arr[this.id];
$("#" + addThis).css({'background-image' : 'url(./coatofarms/'+arr[this.id]+'.png)',
'background-repeat': 'no-repeat',
'background-position': 'bottom'});
我的 jquery 测试悬停是:
$(".inline").hover(function(){
alert('in');
}, function(){
alert('out');
});
该类是 .inline ,但选择不起作用(?)在 div ID 上测试,它工作得很好。有人可以告诉我哪里出错了吗?蒂亚