WordPress.org

Ready to get started?Download WordPress

Forums

Slideshow
[resolved] Add keyboard functionality (4 posts)

  1. frankaguilar
    Member
    Posted 1 year ago #

    Is there a way to add keyboard arrow functionality using the left and right arrows. Maybe have a javascript or jquery script to work it.

    http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/

  2. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    Not yet, but I might add it as an option in a future release. Button functionality will probably be available when touchscreen control is implemented.

  3. frankaguilar
    Member
    Posted 1 year ago #

    In "js/SlideshowPlugin/slideshow.js" add this code to put keyboard functionality to the slider. Hope this helps and saves you time!

    $(document.documentElement).keyup(function (event) {
    // handle cursor keys
    if (event.keyCode == 39) {
    resetInterval();
    gotoView(1, true)
    } else if (event.keyCode == 37) {
    // go right
    resetInterval();
    gotoView(-1, true)
    }
    });
    $previousButton.click(function () {
    if ($buttonsActive) {
    resetInterval();
    gotoView(-1, true)
    }
    });

  4. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, I love it that you're thinking along!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.