简体   繁体   中英

jquery.easing jQuery conflict

I used according menu and slides in a single page. I used "easeOutBounce" from using jquery.easing.1.3.js to according menu.

Now the menu is working fine.

But it conflict with the Slider. I don't need this effect with the Slider. I don't know how to solve this issue.

I don't need "easeOutBounce" effect the Bottom slide of this URL.

The slide is not a problem when I remove this line $.easing.def = "easeOutBounce"; from my code. But I need this effect to according menu.

My code is

<script>
    $(document).ready(function(){
        $.easing.def = "easeOutBounce";
        $('li.button a').click(function(e){
            var dropDown = $(this).parent().next();
            $('li.dropdown').not(dropDown).slideUp('slow');
            dropDown.slideToggle('slow');
            e.preventDefault();
        })
    });
</script>
<script>
    $(function(){
        $('#slides_two').slides({
            generateNextPrev: true,
            pagination: false,
            preload: true,
            preloadImage: 'images/loading.gif',
            generatePagination: false,
            play: 10000,
            slideSpeed: 3000,
            effect: 'slide',
            pause: 4000,
            hoverPause: true
        });
    });
</script>

You can use slideEasing option for your slider. This is how your code would be with this option:

<script type="text/javascript">
      $(document).ready(function(){
    $.easing.def = "easeOutBounce";
    $('li.button a').click(function(e){
    var dropDown = $(this).parent().next();
    $('li.dropdown').not(dropDown).slideUp('slow');
    dropDown.slideToggle('slow');
    e.preventDefault();
})

      });
      </script>
      <script type="text/javascript">
    $(function(){

        $('#slides_two').slides({
            generateNextPrev: true,
            pagination: false,
            preload: true,
            preloadImage: 'images/loading.gif',
            generatePagination: false,
            play: 10000,
            slideSpeed: 3000,
            effect: 'slide',
            pause: 4000,
            hoverPause: true,
            slideEasing: "jswing"
        });

        });
</script>

Easing types you can see here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM