Skip to content

Sugar Slide can slide with flexible width.

Notifications You must be signed in to change notification settings

chenai1112/sugarslide

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sugar Slide

Sugar Slide can slide with flexible width. Demo.

Start

Sugar Slide is very easy to start, suppose we have this html:

<div id="slide">
    <a>
        <!-- anything you like -->
    </a>
    <a>
        <!-- anything you like -->
    </a>
    <a>
        <!-- anything you like -->
    </a>
</div>

Then you can simply add the flowing code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.sugarslide.js"></script>
<script type="text/javascript">
    $('#slide').sugarSlide();
</script>

Done.

Options

$('#slide').sugarSlide({
    time:700,
    prevClass:'prev',
    nextClass:'next'
});

time is the slide time, default value is 1000(ms).

prevClass is the previous link's class name, default value is 'sugarslide-previous'.

nextClass is the next link's class name, default value is 'sugarslide-next'.

About

Sugar Slide can slide with flexible width.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published