2014-06-13 73 views
0

我正在做一個模擬NPR頁面的項目,我想讓徽標反彈,但它不這樣做。圖像沒有在jQuery彈跳

我敢肯定,語法是正確的。我只需要一個額外的眼睛來引導我朝着正確的方向前進。

這裏是我的jQuery:

$(document).ready(function() { 

     $(".nprLogo").mouseenter(function() { 
      $(this).stop().effect("bounce", 500); 

      $(".nprLogo").mouseleave(function() { 
       $(this).stop(true, true); 

      }); 
     }); 
    }); 

,這裏是我的HTML:

<table id="tableHeader"> 
    <tr> 
     <th> 
      <!-- NPR LOGO --> 
      <img class="headerImages" class="nprLogo" src="images/nprlogo.png"> 
    </tr> 
    </th> 
</table> 

我有一個表,因爲這是的指令的一部分。

+0

你有一些不正確的嵌套表標記。 – isherwood

+0

仍然沒有運氣..我嘗試輸入修訂,並添加HTTP到jQuery鏈接和什麼都沒有。 – scrippyfingers

回答

2

這是一個jQuery UI的功能,你需要把它列入除了jQuery的:

<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> 

作爲一個側面說明,你</tr></th>是在錯誤的順序,你需要有</th>第一..