Giter Club home page Giter Club logo

instaslider's Introduction

jQuery InstaSlider

A lightweight (just 2kb when minified!) jQuery image slider / carousel plugin that populates content from an Instagram hashtag or username.
    .__                 __           _________.__  .__    .___            
    |__| ____   _______/  |______   /   _____/|  | |__| __| _/___________ 
    |  |/    \ /  ___/\   __\__  \  \_____  \ |  | |  |/ __ |/ __ \_  __ \
    |  |   |  \\___ \  |  |  / __ \_/ _____  \|  |_|  / /_/ \  ___/|  | \/
    |__|___|  /____  > |__| (____  /_______  /|____/__\____ |\___  >__|   
           \/     \/            \/        \/              \/    \/      

Usage

HTML

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

jQuery

$('.myslider').instaSlider({
      clientID: 'your-id-here',
      access_token: 'your-access-token-here'
});

CSS

This plugin 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}

Demo

http://iamchristill.com/plugins/instaslider/

Default Options

These are the default options for the plugin that can be overridden.
Option Default Required Type Description
clientID null required string A clientID must be generated for this plugin to work. You can do this at http://instagram.com/developer/clients/register/.
access_token null required string An access token is required for to be able to fetch data from a @username. This can be obtained at http://jelled.com/instagram/access-token
search @iamchristill optional string An Instagram hashtag or username for plugin to fetch content from.
prevClass prev optional string css class for 'previous' nav button.
nextClass next optional string css class for 'next' nav button.
limit 5 optional integer Allows for limiting the number of slides.
Duration 400 optional integer Determines the duration of the slide animation.
Auto true optional boolean If true, the slider will automatically slide.
Delay 5000 optional integer Determines the delay before animating.

$('.myslider').instaSlider({
      clientID: null,
      access_token: null
      search: '@iamchristill',
      prevClass: 'prev',
      nextClass: 'next',
      limit: 5,
      duration: 1000,
      delay: 5000
});

Dependencies

Author

Chris Till - iamchristill.com

Licence

The MIT License (MIT)

InstaSlider © Chris Till 2013.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
and associated documentation files (the “Software”), 
to deal in the Software without restriction, including without limitation the rights to use, 
copy, modify, merge, publish, distribute, sublicense, 
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of 
the Software
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 
ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://mit-license.org/

instaslider's People

Contributors

christill avatar

Watchers

Ricardo Correia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.