WordPress.org

Ready to get started?Download WordPress

Forums

Easing Slider "Lite"
[resolved] Stop on hover (7 posts)

  1. gregorcio1992
    Member
    Posted 1 year ago #

    Hi!
    Just like in the topic, is it possible?

    GB! :)

    http://wordpress.org/extend/plugins/easing-slider/

    EDIT:
    I think stop after all slides would be ok either.

  2. MatthewRuddy
    Member
    Plugin Author

    Posted 1 year ago #

    Should be possible using some custom JS. For pause on hover, add this to your theme's header.php before the </head>:

    <script type="text/javascript">
    jQuery(document).ready(function($) {
        $('.easingsliderlite').on('mouseenter', function() {
            $('.easingsliderlite').data('easingsliderlite').startPlayback();
        });
        $('.easingsliderlite').on('click', function() {
            $('.easingsliderlite').data('easingsliderlite').endPlayback();
        });
    });
    </script>

    For ending playback after your slideshow has cycled through all of the slides, use this code:

    <script type="text/javascript">
        jQuery(document).ready(function($) {
            var inc = 0;
            $('.easingsliderlite').data('easingsliderlite').$el.on('nextslide', function() {
                inc++;
                if (inc == $('.easingsliderlite').data('easingsliderlite').count) {
                     $('.easingsliderlite').data('easingsliderlite').endPlayback();
                }
            });
        });
    </script>

    Hope these do the trick :)

  3. itflexdemo
    Member
    Posted 3 months ago #

    I tried this code for pause on hover, but its not working. So I changed it little bit to make it work for me.

    <script type="text/javascript">
    jQuery(document).ready(function($) {
    $('.easingsliderlite').on('mouseenter', function() {
    $('.easingsliderlite').data('easingsliderlite').endPlayback();
    });
    $('.easingsliderlite').on('mouseleave', function() {
    $('.easingsliderlite').data('easingsliderlite').startPlayback();
    });
    });
    </script>

  4. MatthewRuddy
    Member
    Plugin Author

    Posted 2 months ago #

    Just to update everyone, the code I pasted previously was incorrect. As the post is old I'm unable to edit it. Here is the code you should be using for pause on hover.

    jQuery(document).ready(function($) {
        $('.easingsliderlite').on('mouseenter', function() {
            $('.easingsliderlite').data('easingsliderlite').resumePlayback();
        });
        $('.easingsliderlite').on('mouseleave', function() {
            $('.easingsliderlite').data('easingsliderlite').pausePlayback();
        });
    });
  5. little_anarchist
    Member
    Posted 2 months ago #

    I have added this code to the header. It still plays on hover. http://www.brydgespropertymanagement.com/dev/

    jQuery(document).ready(function($) {
        $('.easingsliderlite').on('mouseenter', function() {
            $('.easingsliderlite').data('easingsliderlite').resumePlayback();
        });
        $('.easingsliderlite').on('mouseleave', function() {
            $('.easingsliderlite').data('easingsliderlite').pausePlayback();
        });
    });

    EDIT: I changed to itflexdemo's code and it is now pausing on hover.

  6. MatthewRuddy
    Member
    Plugin Author

    Posted 2 months ago #

    Yup, I'd made another mistake - my head is all over the place! Apologies to everyone!

    Here's the code:

    jQuery(document).ready(function($) {
        $('.easingsliderlite').on('mouseenter', function() {
            $('.easingsliderlite').data('easingsliderlite').pausePlayback();
        });
        $('.easingsliderlite').on('mouseleave', function() {
            $('.easingsliderlite').data('easingsliderlite').resumePlayback();
        });
    });
  7. simone_asr
    Member
    Posted 1 month ago #

    Thank You Matthew!! :D

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic