- 我正在使用Hoverintent JQuery插件進行DIV展開。
- 現在我希望它的工作「上點擊」而不是「懸停」
我該怎麼辦呢?我知道這是簡單的JQuery,但我的知識缺乏。任何幫助將非常感激。下面是代碼:JQuery hoverintent:將「懸停」轉換爲「單擊」
$(document).ready(function(){
//Expand Div
$("#expandbutton").click({
over: ExpandDiv,
timeout: 100,
out: DoNothing
});
});
function ExpandDiv(){
$("#expander").animate({"height":200},400, "easeOutSine");
$("#expandbutton").css({opacity: 0.0, visibility: "hidden"}).animate({opacity: 0.0});
}
謝謝戴夫。它的工作 – Gaelen 2011-05-27 13:49:26