Code Monkey home page Code Monkey logo

goreslider's Introduction

GoreSlider v1.0

GoreSlider is a basic image slider compatible with IE6. It requires jQuery.

Example

See an example online : http://git.petegore.fr/goreslider/example

How does it work ?

GoreSlider can create a slider using basic div tags, or table tag for better IE compatibility. Just create a container and put your pictures on it.

How to use

Step 1 : CSS

Don't forget to the IE6 compatibily stylesheet with conditional comments.

<link rel="stylesheet" href="../css/goreslider.css"/>
<!--[if lte IE 8]>
    <link rel="stylesheet" href="{{ asset('./css/goreslider-ie6.css') }}">
<![endif]-->

Step 2 : Javascript

Load the GoreSlider Javascript main file and the jQuery one if you don't use it in your application :

<script src="../js/jquery.js"></script>
<script src="../js/goreslider.js"></script>

Step 3 : preparing the HTML

GoreSlider needs a div to insert the slider. This div should have a parent element with a given width, or the slider width will be 100% of the page. Check the example for further information.

<div class="slider-container" style="width:800px">
    <div id="my-table-slider">
        <img src="pictures/picture_1.jpg"/>
        <img src="pictures/picture_2.jpg"/>
        <img src="pictures/picture_3.jpg"/>
    </div>
</div>

Step 4 : GoreSliding the element

A simple call on the element you want to "goreslide".

$('#operation-slider img').hide();  // Hiding images during their load
$(window).load(function(){
    $('#operation-slider').goreslider({
        // Params
    });
});

Step 5 : customize the slider

Let's have a look at the different options you can use through an example. Here are the default options :

$(window).load(function(){
    $('#operation-slider').goreslider({
        hideMePlease: true,             // Hide the image during their load before the slider is ready
        auto: true,                     // Autorun one loaded
        autoPause: true,                // Autostop when mouse hover
        speedStrip: 500,                // Transition duration between pictures
        maxWidth: "auto",               // Slider maximal width ; if auto it will use the parent width
        maxPicturesWidth: 600,          // Max picture width inside the slider
        maxHeight: 450,                 // Max picture height inside the slider
        picturesPadding: 5,             // Padding between picture and its border
        sliderDelay: 3000,              // Delay between each picture
        controlNavigation: true,        // Display or not the control thumbnails at the bottom
        table: false                    // Table mode or div mode
    });
});

goreslider's People

Contributors

petegore avatar

Stargazers

Tanguy BELIN avatar

Watchers

James Cloos avatar  avatar

goreslider's Issues

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.