InstaSlider: Instagram Slider Plugin

InstaSlider is a lightweight (just 2kb when minified!) jQuery plugin image slider / carousel plugin that populates content from an Instagram hashtag.

Download: https://github.com/jonsherrard/instaslider

Demonstration: https://jsfiddle.net/pCQkF/2/

Plugin homepage: https://github.com/jonsherrard/instaslider

Implementation:

1. FIRST, INCLUDE JQUERY FILES

<!-- jQuery files -->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="instaslider.jquery.min.js"></script>

2. ADD YOUR HTML

<div class="myslider"></div>

3. CUSTOMIZE INSTASLIDER WITH CSS

InstaSlider can be fully customised using CSS. The default styling is provided below.

.myslider{width:500px;height:500px;border:1px solid gray;margin:0 auto}
.instaslider-wrapper{width:500px;height:500px;background:#e7e7e7;overflow:hidden}
.instaslider-wrapper ul{width:10000px;list-style:none}
.instaslider-wrapper ul li{float:left}
div.error{width:100%;height:100%;background:rgba(0,0,0,0.6);color:#fff;font-family:arial;text-align:center}
div.error p{width:300px;line-height:180%;margin:0 auto;padding:167px 0 0}
.instaslider-wrapper ul li img{width:500px;height:auto}
.instaslider-nav{position:relative;top:-50%;margin:-50px 0 0}
.instaslider-nav .prev,.instaslider-nav .next{border:0;width:100px;height:100px;cursor:pointer;background:#072835;text-indent:-9999px}
.instaslider-nav .prev:hover{background-position:-2px -100px}
.instaslider-nav .next:hover{background-position:-98px -100px}
.instaslider-nav .prev{float:left;background:#072835 url(../img/arrow_sprite.png) 0 0}
.instaslider-nav .next{float:right;background:#072835 url(../img/arrow_sprite.png) -100px 0}

4. NOW, CALL INSTASLIDER PLUGIN

// Simple call
$('.myslider').instaSlider({
       clientID: 'your-id-here'
});
 
// Call with options
$('.myslider').instaSlider({
      clientID: null,
      hash: 'photooftheday',
      prevClass: 'prev',
      nextClass: 'next',
      limit: 5,
      duration: 1000
});

Options:

clientIDStringDefault : null – A clientID must be generated for this plugin to work. You can do this at http://instagram.com/developer/clients/register/.
hashStringDefault : photooftheday – An Instagram hashtag for plugin to fetch content from.
prevClassStringDefault : prev – css class for ‘previous’ nav button.
nextClassStringDefault : next – css class for ‘next’ nav button.
limitIntegerDefault : 5 – Allows for limiting the number of slides.
durationIntegerDefault : 400 – Determines the duration of the slide animation.

Screenshots:

How to Create Custom CSS, jQuery Autocomplete Plugin

Web developers often use autocomplete features in websites as a part of their work. Yet lot of good …

How to Make Sticky Sidebar Using jQuery and CSS

Sticky sidebar is an essential part of web development. Not in all cases but for some cases where ou…

Selectors, Animation, and AJAX – jQuery Tutorial And Examples

By now I’m sure you have grasped at least the basics and simplicity of the jQuery library. Now it’s …

s3Slider jQuery Plugin & Tutorial

The s3Slider jQuery plugin is made by example of jd`s smooth slide show script. Usage: HTML: Sample …

jQuery Optimization: Avoid Unnecessary Selector

Common subexpression elimination is a common way to optimize any programming code. Doing unnecessary…

Fading Links Using jQuery: dwFadingLinks

Earlier this month, we posted a MooTools script that faded links to and from a color during the mous…