A Responsive JQuery Slider

Overview

Turntable.js :: A Responsive JQuery Slider


A jQuery plugin that will flip through a list of images as your mouse sweeps across a container

Usage


All image sources need to be included in a data attribute on the li, and the image tags will be dynamically added. Make sure it is called data-img-src, followed by the link to your images.

There is very minimal css for the slider, but is necessary for its function. Feel free to copy and paste this code into your css file, or include a link for this.

HTML
<div id="myTurntable" class="turntable">
  <ul>
    <li data-img-src="./images/0.jpg"></li>
    <li data-img-src="./images/1.jpg"></li>
    <li data-img-src="./images/2.jpg"></li>
    <li data-img-src="./images/3.jpg"></li>
    <li data-img-src="./images/4.jpg"></li>
    <li data-img-src="./images/5.jpg"></li>
  </ul>
</div>
Javascript
  $('#myTurntable').turntable();
CSS
.turntable {
  display: inline-block;
  margin: 0px;
}
.turntable ul {
  padding: 0px;
  margin: 0px;
}
.turntable ul li {
  list-style-type: none;
  display: none;
}
.turntable ul li img {
  width: 100%;
}
.turntable ul li.active {
  display: block;
}

Settings


The plugin accepts one setting, the axis object. You can decide if you want to flip through the images as your mouse moves along the x or y axis of the container. You can pass the options in when you call the plugin like this.

$('#mySpinnyContainer').turntable({
  axis: 'x, y, or scroll',
  reverse: boolean, // true or false, will reverse the array of images
  scrollStart: 'top, middle, or bottom', // only necessary if axis = 'scroll'
});```
 The plugin will default to x if no option is provided.

### Dependencies
***
jQuery
Comments
  • Problem using turntable with xhtml

    Problem using turntable with xhtml

    Dear reader/s, Using html-docs turntable works as desired. Trying to embed it into a xhtml-doc (needed for an eBook) it doesn't work any longer. Any ideas are welcome. Thank You and best wishes Eglon

    opened by elEglon 2
  • Change direction on swipe

    Change direction on swipe

    Hi! This is no "issue" in the strict sense, just found it a bit counter-intuitive when swiping e.g. from left to right on the demo, and the image is rotating the other way round. Surely depends on what kind of image you want to rotate but it might be a nice advancement to be able to reverse the rotation. Nice script :)

    opened by gimesi 2
  • Bump jquery from 2.2.4 to 3.4.1

    Bump jquery from 2.2.4 to 3.4.1

    Bumps jquery from 2.2.4 to 3.4.1.

    Commits
    • 75f7e96 3.4.1
    • 7dddb19 Core: Make isAttached work with iOS 10.0-10.2
    • 6c1e7db Event: Prevent leverageNative from registering duplicate dummy handlers
    • 24d71ac Event: Fix handling of multiple async focus events
    • b4fadc9 Build: Test on Node.js 12, stop testing on Node.js 6 & 11
    • 0d4af52 Build: Fix unresolved jQuery reference in finalPropName
    • 22caea8 Build: Updating the 3.4-stable version to 3.4.1-pre
    • 59ea765 Release: update AUTHORS.txt
    • 7c1ef15 Release: update version to 3.4.0-pre
    • d940bc0 Build: Update Sizzle from 2.3.3 to 2.3.4
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Add input range as a possible point of control

    Add input range as a possible point of control

    I added an optional feature that enables the use of an input[type="range"] as a point of control, allowing the user of the plugin to flip through images using a slider. This feature is off by default, as mouse/touch movements are still the core use case for this plugin.

    I've also added additional setting options that allow mouse, touch and slider events to be enabled/disabled, as well as an option to specify the selector for the slider. Mouse and touch are enabled by default.

    I've updated the README to reflect these changes.

    Hope you like what I've done! Let me know if you have any suggestions or feel these changes do not fall within the scope of your repo.

    Cheers, Igor

    opened by ibarsi 1
  • Videos instead of images

    Videos instead of images

    Would it work with videos instead of images as source?

    I would like to make a video turntable that user can watch from any angle. Perhaps there is existing library for video turntable?

    Thanks

    opened by tasiotas 0
  • Bump jquery from 2.2.4 to 3.5.0

    Bump jquery from 2.2.4 to 3.5.0

    Bumps jquery from 2.2.4 to 3.5.0.

    Commits
    • 7a0a850 3.5.0
    • 8570a08 Release: Update AUTHORS.txt
    • da3dd85 Ajax: Do not execute scripts for unsuccessful HTTP responses
    • 065143c Ajax: Overwrite s.contentType with content-type header value, if any
    • 1a4f10d Tests: Blacklist one focusin test in IE
    • 9e15d6b Event: Use only one focusin/out handler per matching window & document
    • 966a709 Manipulation: Skip the select wrapper for <option> outside of IE 9
    • 1d61fd9 Manipulation: Make jQuery.htmlPrefilter an identity function
    • 04bf577 Selector: Update Sizzle from 2.3.4 to 2.3.5
    • 7506c9c Build: Resolve Travis config warnings
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by mgol, a new releaser for jquery since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Make script compatible with jQuery 3.

    Make script compatible with jQuery 3.

    Fixes #12 jQuery 3 has deprecated .load event in favour of .on("load", eventHandler). This pull request replaces the only instance of .load with the new syntax. Tested with jQuery 3.2.1 and 1.9.1 for retrocompatibility.

    opened by bolduz 0
  • Connecting to an range input slider

    Connecting to an range input slider

    Hi there,

    Of most plugins out there, found turntable to be quite performant on mobile. Noob Question: Any ideas on officially adding support for the range input for the plugin? Or any guidance to readily connect it at present?

    Thanks!

    opened by vilav 9
  • Work with WebVTT files

    Work with WebVTT files

    Hi,

    Will be possible to make it work with WebVTT Files? Something like this:

    WEBVTT
    
    00:00:00.000 --> 00:00:10.000
    213509-35685.jpg#xywh=0,0,120,68
    
    00:00:10.000 --> 00:00:20.000
    213509-35685.jpg#xywh=120,0,120,68
    
    00:00:20.000 --> 00:00:30.000
    213509-35685.jpg#xywh=240,0,120,68
    
    00:00:30.000 --> 00:00:40.000
    213509-35685.jpg#xywh=360,0,120,68
    
    00:00:40.000 --> 00:00:50.000
    213509-35685.jpg#xywh=480,0,120,68
    
    00:00:50.000 --> 00:01:00.000
    213509-35685.jpg#xywh=600,0,120,68
    
    00:01:00.000 --> 00:01:10.000
    213509-35685.jpg#xywh=720,0,120,68
    
    00:01:10.000 --> 00:01:20.000
    213509-35685.jpg#xywh=840,0,120,68
    
    00:01:20.000 --> 00:01:30.000
    213509-35685.jpg#xywh=960,0,120,68
    
    00:01:30.000 --> 00:01:40.000
    213509-35685.jpg#xywh=1080,0,120,68
    
    00:01:40.000 --> 00:01:50.000
    213509-35685.jpg#xywh=0,68,120,68
    

    Thanks!

    opened by elalemanyo 1
Responsive Tabs is a jQuery plugin that provides responsive tab functionality.

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.

Jelle Kralt 537 Dec 8, 2022
MenuSlider-Javascript - How to create a menu slider with vanilla javascript

MenuSlider-Javascript How to create a menu slider with vanilla javascript Instal

Tarokh Mohammadi 1 Feb 8, 2022
A dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more

Glide.js is a dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more What can co

null 6.7k Jan 3, 2023
Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App

iSlider iSlider is a lightweight, high-performant, no library dependencies cross-platform slide controller. It can help handling most sliding effects,

Baidu BEFE 1.7k Nov 25, 2022
Swipe is the most accurate touch slider.

Usage Swipe only needs to follow a simple pattern. Here is an example: <div id='slider' class='swipe'> <div class='swipe-wrap'> <div></div>

Brad Birdsall 6.8k Dec 16, 2022
A lightweight, modern and customizable JavaScript slider library.

NSlider NSlider is a lightweight (< 10 KB), modern and customizable JavaScript slider library. CDN Development https://cdn.jsdelivr.net/gh/fatihege/ns

Fatih 6 Jan 20, 2022
A very simple image slider that will responsively work with images of any size or shape

Square1 A very simple image slider that will responsively work with images of any size or shape. requires jQuery Demo Installation Link to jQuery <sc

Thom 9 May 20, 2022
UI slider control that magnifies the current value

jquery-rsSliderLens Renders a powerfull input range control. With minor differences, all browsers render an <input type="range" /> pretty much the sam

Jose Rui Santos 21 Apr 22, 2022
Tool Cool Range Slider

Responsive range slider library written in typescript and using web component technologies. Pure JavaScript without additional dependencies. It has a rich set of settings, including a vertical slider, touch, mousewheel and keyboard support, local and session storage, and RTL support.

Tool Cool 23 Dec 31, 2022
Rotating slider for selecting numerical values.

Rotating slider for selecting numerical values. Allows mobile friendly precise selection for value from selected range with desired step. Component is especially useful for hybrid application using frameworks like Ionic, Cordova or PhoneGap.

null 0 Sep 27, 2022
Pure JavaScript HTML5 Canvas Range Slider. No stylesheet needed. Simple, elegant and powerful. A quirky alternative to other sliders.

CanvasSlider CanvasSlider is a lightweight JavaScript range slider. Most of the range slider controls use Javascript and a stylesheet. This slider use

null 7 Aug 15, 2022
Slide everything into this vanilla javascript slider: just 20kb all-inclusive, no dependencies!

Lightweight vanilla javascript media and contents slider, by LCweb Just 20KB to have: Top features list: single file, no dependencies, 100% pure javas

Luca 4 May 12, 2021
Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices

Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices like: web, tablets, Mobile (IPad & IPhone). This plugin adapts the screen size and changes its action accordingly.

Samson Onna 600 Dec 8, 2022
A jquery plugin that makes images truly responsive, without sacrificing anyone's face. Give it more stars!

Responsify.js A jquery plugin that makes images truly responsive, without sacrificing anyone's face :D When images are used in a responsive container

Wenting Zhang 1.3k Dec 14, 2022
Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...

Freewall Freewall is a cross-browser and responsive jQuery plugin to help you create many types of grid layouts: flexible layouts, images layouts, nes

Minh Nguyen 1.9k Dec 27, 2022
Responsive tabs-to-accordion script without jQuery, written using pure JavaScript

vanilla-tabs Responsive tabs-to-accordion script without jQuery, written using pure JavaScript Author Dmytro Kudleichuk LinkedIn GitHub Online Demo Se

Dmitriy Kudleichuk 7 Dec 20, 2022
Simple, responsive and lightweight Masonry Grid jQuery Plugin.

jquery-masonry-grid Simple, responsive and lightweight Masonry Grid jQuery Plugin. Installation Add the script before closing the <body> tag (make sur

Peter Breitzler 8 Jun 9, 2022
JS Irontable - A responsive Jquery Table for multiple purposes

JSIronTable JS IronTable - A responsive Jquery Table for multiple purposes This table provides a responsive JQuery table which includes: Column Sortin

Raftopoulos Yannis 1 May 26, 2021
Responsive, CSS3, touch-enabled jQuery Coverflow plugin.

jQuery.Flipster Flipster is a CSS3 3D transform-based jQuery plugin built to replicate the familiar 'cover flow' effect, but also supports a variety o

Adrien Delessert 704 Dec 28, 2022