0

我在设计中使用 .animate() 作为 div,虽然它显示了内容,但它只在关闭时显示动画,而不是在打开时显示。

单击右上角的德国国旗时,您可以在此处看到它:

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:mp@inwx.de<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>
4

1 回答 1

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");
    };
  });
于 2013-06-12T15:49:49.447 回答