[問題] jQuery的js檔 import問題已刪文
※ [本文轉錄自 Ajax 看板]
作者: martone (Krel) 看板: Ajax
標題: [問題] jQuery的js檔 import問題
時間: Fri Oct 24 10:43:31 2008
請問各位
$(document).ready(function(){
$("#nav-one li").hover(
function(){ $("ul", this).fadeIn("fast"); },
function() { }
);
if (document.all) {
$("#nav-one li").hoverClass ("sfHover");
}
});
$.fn.hoverClass = function(c) {
return this.each(function(){
$(this).hover(
function() { $(this).addClass(c); },
function() { $(this).removeClass(c); }
);
});
};
像這樣的jQuery,將它另存為js。希望主頁內碼能短一點,因此想import它
如:<script type="text/javascript" src="js/xxxx.js"></script>
但卻沒有效果,請問是方法不對嗎? 請各位指教 ^^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.1.10
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.1.10
推
10/25 16:35, , 1F
10/25 16:35, 1F
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章