2016-04-14 1 views
0

別の内部のモーダルと別のものが

 $(function() { 
 
    //----- OPEN 
 
    $('[data-popup-open]').on('click', function(e) { 
 
     var targeted_popup_class = jQuery(this).attr('data-popup-open'); 
 
     $('[data-popup="' + targeted_popup_class + '"]').fadeIn(350); 
 
    
 
     e.preventDefault(); 
 
    }); 
 
    
 
    
 

 
});
.popup { 
 
    width:500px; 
 
    height:500px; 
 
    display:none; 
 
    position:fixed; 
 
    top:0px; 
 
    left:0px; 
 
    background:rgba(193, 49, 49, 0.55); 
 
    z-index: 99; 
 
} 
 
.popup-1{ 
 
    width:500px; 
 
    height:500px; 
 
    display:none; 
 
    position:fixed; 
 
    top:0px; 
 
    left:0px; 
 
    background:green; 
 
    z-index: 99; 
 
}
<div class="popup-1" data-popup="popup-2"> 
 
    <button type="button"><a class="btn" data-popup-open="popup-1" href="#">Regjistrohu</a></button> 
 
</div> 
 
<div class="popup" data-popup="popup-1"> 
 
    <button type="button"><a class="btn" data-popup-open="popup-2" href="#">login</a></button> 
 
</div> 
 
<button type="button"><a class="btn" data-popup-open="popup-2" href="#">add</a></button>

こんにちは、私はログインをやっているのjQueryで開いているときに消えるとjQueryでモーダルのようにフォームを登録する最後のものにする方法ときに私私はログインモードで登録しようとすると、私はまた、別のものがアクティブになっているときにそれらをオフにしたいと思っても動作しません。これまでのところ彼女は私のコードです:http://codepen.io/xhepigerta/pen/vGRdvb 誰かが私を助けることができますか?おかげ

+2

リンクを修正してください –

+0

https://jsfiddle.net/ uが良くなっ –

+0

をご覧くださいここhttp://codepen.io/xhepigerta/ペン/ vGRdvb –

答えて

関連する問題