Skip to content

moritzgvt/mySlider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

mySlider.js

a quick and easy to use slider-plugin for jQuery

getting started

what you need:

  • jQuery (i tested with 3.3.1)
  • a own css-file (for the root-div and your custom control-styles)
  • if you want to use the styled prestyled controls add the mySliderES.css file to your project

how to use:

add the mySliderES.min.js file to your website-project
add html code like this:

    <div class="myContainer">
    
      <ul>
      
        <li>
          <img src="img1.jpg" alt="First Picture"> 
        </li>
        
        <li>
          <img src="img2.jpg" alt="Second Picture">
        </li>
        
        <li>
          <img src="img3.jpg" alt="Third Picture">
        </li>
        
      </ul>
    
    </div>

add slider to .myContainer with jQuery:

jQuery('.myContainer').mySlider([type], [duration], [transition], [controls], [interval]);

Parameter

type | String

default: classic
classic: gives you classic slider with controls
auto: gives you a automatic slider without controls

duration | Integer

default: 200
the duration of the slide animation in ms

transition | String

default: linear
every transition that is possible for jQuery Animate

controls | String

default: enableControlsStyle
enableControlsStyle || disableControlsStyle
enables or diables the controls style

interval | Integer

default: 5000
defines the interval for the automatic slider