[問題] jQuery的js檔 import問題已刪文

看板Web_Design作者 (Krel)時間17年前 (2008/10/24 10:44), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
※ [本文轉錄自 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
文章代碼(AID): #190JPz25 (Web_Design)
文章代碼(AID): #190JPz25 (Web_Design)