JSONslider is a simple jQuery slider for pictures stored dynamically in a JSON file you can edit without messing up your HTML.
JavaScript
Switch branches/tags
Clone or download
Latest commit e7715a0 Dec 10, 2017
Permalink
Failed to load latest commit information.
demo
dist build Dec 10, 2017
src fixes style Dec 10, 2017
.editorconfig update to commonjs/AMD Dec 10, 2017
.eslintignore update to commonjs/AMD Dec 10, 2017
.eslintrc.json update to commonjs/AMD Dec 10, 2017
.gitignore update to commonjs/AMD Dec 10, 2017
.npmignore update to commonjs/AMD Dec 10, 2017
.travis.yml
LICENSE update to commonjs/AMD Dec 10, 2017
README.md update to commonjs/AMD Dec 10, 2017
gulpfile.js update to commonjs/AMD Dec 10, 2017
package.json update to commonjs/AMD Dec 10, 2017

README.md

JSONslider

JSONslider is a simple jQuery slider for pictures stored dynamically in a JSON file you can edit without messing up your HTML.

SET UP

1 - Set up the JSON file

The JSON file must have at least these names and values:

{ "pictures": [
  {
    "url" : "path-to-picture-1",
    "alt" : "A little description"
  }
] }

2 - Set HTML tag

Give a unique ID or a class to an empty <div> in your HTML, embed the json file in the data attr and set the desired aspect-ratio:

3 - Run the function

This is an example of how the function must be called with all available options.

$( document ).ready(function() {
  	$( '#slider' ).jsonSlider();
});