2013-06-12 74 views
0

我在設計中使用了.animate()作爲div,雖然它顯示內容,但它僅在關閉時顯示動畫,而不在打開時顯示。jQuery .animate()僅返回動畫

你可以在這裏看到,在德國國旗點擊右上角時:

http://cccctanger.com/inwx/index-logged-in-actual.html

有什麼想法?可能是與其他腳本衝突?

<div class="pull-right"> 
<a class="ix-lang" href="#">DE <img src="img/flag-de.png"/></a> 
<span class="ix-lang-more"> 
<a href="#">EN <img src="img/flag-en.png"/></a> 
<a href="#">ES <img src="img/flag-es.png"/></a> 
</span> 
</div> 

而jQuery的:

<script type="text/javascript"> 
/* <![CDATA[ */ 
(function($) { 
    $('a[href="#"]').click(function(e) { 
     e.preventDefault(); 
    }); 
})(jQuery); 
/* ]]> */ 
</script> 
<script> 
jQuery(function ($) { 
$("a").tooltip() 
    }); 
</script> 

<script> 
$("select.ix-select-contact").change(function(){ 
    $(".ix-show-details").empty(); 
    $(".ix-show-details").append("<strong>Mario Peschel</strong> · InterNetworX Ltd. & Co. KG<br />Telefon:+49.3066400137 Fax:+49.3066400138<br />E-Mail:[email protected]<br />Berlin, Tempelhofer Damm 140 12099, DE"); 
}); 
</script> 
<script> 
$(document).ready(function{ 
$('#myTab a').click(function (e) { 
    e.preventDefault(); 
    $(this).tab('show'); 
}) 
}); 
</script> 
<script> 
$(document).ready(function(){ 
    $('.ix-btn-custom').popover({ 
    html : true, 
    content: function() { 
     return $('#popover_content_wrapper').html(); 
    } 
    }); 
}); 
</script> 
<script> 
$('.ix-lang').click(function(){ 
$('.ix-lang-more').animate({width: 'toggle'}, 'easeInExpo');}) 
</script> 
+2

,你能否告訴我們有關的代碼,我不喜歡通過您的網站挖掘。 – dezman

+0

jsfiddle怎麼樣? –

+0

已添加!抱歉! (: –

回答

0

試試這個代碼

TriggerClick = 0; 

    $(".ix-lang").click(function(){ 
    if(TriggerClick==0){ 
     TriggerClick=1; 
     $(".ix-lang-more").animate({width:'60px'}, "easeInExpo"); 
    }else{ 
     TriggerClick=0; 
     $(".ix-lang-more").animate({width:'0px'}, "easeInExpo"); 
    }; 
    }); 
+0

Thx aimadnet,但它根本不打開:/ –