2017-08-13 6 views
1

私はアニメーション・マルチレベルのjQuery-ドロップダウン・プラグインを使用していると私は、次のエラーが発生しました:Animated-Multi-level-jQuery-Dropdown-Pluginにエラーがありますか?

jquery-1.11.1.min.js:2 Uncaught TypeError: Cannot read property 'length' of undefined at Function.each (jquery-1.11.1.min.js:2) at Dropdown.addItem (jquery.dropdown.js:1274) at Object. (jquery.dropdown.js:1185) at Function.each (jquery-1.11.1.min.js:2) at Dropdown.addItems (jquery.dropdown.js:1183) at Dropdown.addItem (jquery.dropdown.js:1269) at Object. (jquery.dropdown.js:1185) at Function.each (jquery-1.11.1.min.js:2) at Dropdown.addItems (jquery.dropdown.js:1183) at Dropdown._populateList (jquery.dropdown.js:2380)

が、これは私のコードです:

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <meta name="description" content=""> 
    <meta name="author" content=""> 


    <link href="css/jquery.dropdown.css" rel="stylesheet" type="text/css"> 
    <link rel="stylesheet" href="css/font-awesome.min.css"> 
    </head> 

    <body role="document"> 

    <div class="container"> 

     <select> 
     <option>Select Option 1</option> 
     <option>Option 2</option> 
     <option>Option 3</option> 
     </select> 

     <!-- Html lists --> 

     <ul> 
     <li>Item 1</li> 
     <li data-dropdown-text="Item 2"> 
      <ul> 
      <li data-dropdown-text="Item 2.1"> 
       <ul> 
       <li>Item 2.1.1</li> 
       <li>Item 2.1.2</li> 
       <li>Item 2.1.3</li> 
       </ul> 
      </li> 
      <li data-dropdown-text="Item 2.2"> 
       <ul> 
       <li>Item 2.2.1</li> 
       <li>Item 2.2.2</li> 
       <li>Item 2.2.3</li> 
       </ul> 
      </li> 
      <li data-dropdown-text="Item 2.3"> 
       <ul> 
       <li>Item 2.3.1</li> 
       <li>Item 2.3.2</li> 
       <li>Item 2.3.3</li> 
       </ul> 
      </li> 
      </ul> 
     </li> 
     <li>Item 3</li> 
     </ul> 
     </div> 



    ================================================== --> 
    <!-- Placed at the end of the document so the pages load faster --> 
    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> 
    <script src="js/jquery.dropdown.js"></script> 
    <script> 

      $('select, ul').dropdown(); 

    </script> 
    <!--<script src="js/bootstrap.min.js"></script>--> 

    </body> 
    </html> 

私は知らない私を助けてくださいどこに問題がありますか?

答えて

0

私はjQueryのバージョンを1.12.4に変更したときに同様の問題が発生しましたが、消えました。

+0

本当にありがとう@リチャード、あなたの答えは私を助けました。 – MHF

+0

チェックボタンで回答を受け入れることができます:)あなたは大歓迎です –

関連する問題