我敢肯定,這是一個簡單的問題..我已經浪費了太多的時間已經在它jQuery的提示,使HREF標題消失
我有如下形象:
<img src="/_/img/icons/103-map.png" alt="Find Me" title="come and find me..." class="action findMe_map"/>
而下面JavaScript的使用jQuery的1.2.6工具:
<script>
$(document).ready(function() {
// create custom animation algorithm for jQuery called "bouncy"
$.easing.bouncy = function (x, t, b, c, d) {
var s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}
// create custom tooltip effect for jQuery Tooltip
$.tools.tooltip.addEffect("bouncy",
// opening animation
function(done) {
this.getTip().animate({top: '+=15'}, 500, 'bouncy', done).show();
},
// closing animation
function(done) {
this.getTip().animate({top: '-=15'}, 500, 'bouncy', function() {
$(this).hide();
done.call();
});
}
);
$('img.findMe_map').click(function() {
event.preventDefault();
console.log(this);
$('img[title]').tooltip({effect: 'bouncy'});
});
</script>
當我使用上面的代碼,標題由消失輸出和工具提示不顯示我想這個問題解決
當我註釋掉
click()
的提示行,單擊圖像,「來找我......」出現在安慰。
困惑。
由於瀏覽器經常會將'title'屬性顯示爲工具提示,因此大多數工具提示插件會移除'title'屬性以防止兩者一次彈出。 – Blazemonger 2011-12-29 13:30:20