2016-09-08 26 views
0

我試圖運行多個內容多模型收藏多模型箱,我認爲是因爲在JS中定義的模型目標ID,這裏是一個工作JSFiddleAnimatedModel - 使用插件<a href="http://joaopereirawd.github.io/animatedModal.js/" rel="nofollow">Animated Model</a></p> <p>它可以用在一個鏈接,但是當我嘗試做一個重複的盒子它不工作不工作

任何人都可以請建議如何使用此插件使多個模型框?

<a id="demo01" href="#animatedModal">DEMO01</a> 
<div id="animatedModal"> 
    <div class="close-animatedModal"> CLOSE MODAL </div> 
    <div class="modal-content"> 
    modal content goes here 
    </div> 
</div> 

回答

0

都在烏爾小提琴首先,2個元素具有相同的ID,這是不應該的,因爲每個元素應該有一個文檔中的唯一ID和你可以看一看我在這裏的小提琴 - JSFiddle

與JS

//demo 01 
    $("#demo01").animatedModal(); 

    //demo 02 
    $("#demo02").animatedModal({ 
    modalTarget: 'animatedModal2' 
    }); 
+0

感謝。它的工作完美 –

0

請試試這個代碼: -

$("#demo02").animatedModal({ 
      modalTarget:'modal-02', 
      animatedIn:'lightSpeedIn', 
      animatedOut:'bounceOutDown', 
      color:'#3498db'     
     }); 
相關問題