jQuery中的内容滑块推子

时间:2013-04-11 20:32:37

标签: jquery html

在“手部力量”部分的http://www.elitedeafpoker.com/dev/上,我试图让内容(淡入和淡出)显示在右侧显示“皇家同花顺”的区域。我在“皇家同花顺”后面排列了10个手部力量信息。当我单击其中一个列表项时,它不起作用,它不会做任何事情。

HTML

<ul class="hand-strength" style="margin-left:15px;">
   <li class="selected-royalflush" id="nav-fragment-1"><a href="#fragment-1">ROYAL FLUSH</a></li>
   <li class="selected-straightflush" id="nav-fragment-2"><a href="#fragment-2">STRAIGHT FLUSH</a></li>
   <li class="selected-fourkind" id="nav-fragment-3"><a href="#fragment-3">FOUR OF A KIND</a></li>
   <li class="selected-fullhouse" id="nav-fragment-4"><a href="#fragment-4">FULL HOUSE</a></li>
   <li class="selected-flush" id="nav-fragment-5"><a href="#fragment-5">FLUSH</a></li>
   <li class="selected-straight" id="nav-fragment-6"><a href="#fragment-6">STRAIGHT</a></li>
   <li class="selected-threekind" id="nav-fragment-7"><a href="#fragment-7">THREE OF A KIND</a></li>
   <li class="selected-twopair" id="nav-fragment-8"><a href="#fragment-8">TWO-PAIR</a></li>
   <li class="selected-onepair" id="nav-fragment-9"><a href="#fragment-9">ONE-PAIR</a></li>
   <li class="selected-highcard" id="nav-fragment-10"><a href="#fragment-10">HIGH-CARD</a></li> 
</ul>

(显示信息)

<div id="fragment-1" class="ui-tabs-panel">  
   <div class="info" >  
      <h2><strong>ROYAL FLUSH</strong></h2>  
      <p>An ace high straint flush.</p> 
      <p class="cards"><img src="img/cards-royalflush.png" alt="Royal Flush" width="466" height="121" /></p>   
   </div>  
</div> 
<div id="fragment-2" class="ui-tabs-panel ui-tabs-hide">  
   <div class="info" >  
      <h2><strong>STRAIGHT FLUSH</strong></h2>  
      <p>A five-card straight, all of the same suit.</p> 
      <p class="cards"><img src="img/cards-straightflush.png" alt="" /></p>   
   </div>  
</div>  
<div id="fragment-3" class="ui-tabs-panel ui-tabs-hide">  
   <div class="info" >  
      <h2><strong>FOUR OF A KIND</strong></h2>  
      <p>Four cards of equal rank - also called "Quads."</p> 
      <p class="cards"><img src="img/cards-fourkind.png" alt="" /></p>   
   ...........

的jQuery

$(document).ready(function(){  
    $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);  
});

1 个答案:

答案 0 :(得分:1)

控制台中存在JavaScript错误:

Uncaught ReferenceError: jQuery is not defined 

这打破了网站上的JavaScript功能。您需要在 jQueryUI之前包含jQuery库

在来源中,包含目前是:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script> 
<script type="text/javascript" src="js/rotate1.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>

修改:来源仍不正确:

<script type="text/javascript" src="js/rotate1.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script> 
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>