Evolve - Ryan Bruzan - Web design and development Evolve - Ryan Bruzan - Web design and development

Nerve Slider 6.1
Download .zip Free

Changelog

  • Added "right" and "down" to available choices for the slideTransitionDirection option. See options table below for details.
  • Added slideReverse option. See options table below for details.
  • Added simultaneousCaptions option. See options table below for details.

The Basic Explanation or skip to download

This is Nerve Slider, an extremely customizable jQuery image gallery. It's a responsive, multi-transitional, image-scaleable fading/sliding image gallery. Set it as a background slideshow, use it as a "living" thumbnail scroller, or even use it to scroll news.

Nerve Slider is the most versatile slider ever. Some of its features include that it is...

  • Fully responsive (allows percentages in width and/or height)
  • Adaptable (can resize itself to your browser, with or without aspect ratio)
  • Scaleable (you can set Nerve Slider to fit, fill, or stretch the images to fit)
  • Keyboard supported (listens to the keyboard - try out the left, right, escape, and num keys)
  • Mobile supported (allow gestures and dragging)

Supported

The Way it Works

Make it yours.

Nerve Slider was built around you. It comes with quite a few options, all made to help you customize Nerve Slider to your liking.

As of now, Nerve Slider has [undefined] options, each made to blend with your needs, and make it easy to do so. Add a few options here and there, and boom - it's yours.

Don't like that color there? Nerve Slider comes with unminified CSS, meaning humans like you and I can read it without too much of a struggle. That way you can edit it the way you want, making the slider look like your very own.

Want to see test out a new demo for Nerve Slider? Check it out

How Do I Set it Up?

Nerve's setup is a very simple process, done in just 4 simple steps. When you're done, you'll have an awesome new gallery to play with!

1 Include the jQuery library

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>

2 Include the Nerve Slider jQuery & CSS:

<script type="text/javascript" src="http://code.ryanbruzan.net/nerveSlider/jquery.nerveSlider.min.js"></script>
<link type="text/css" href="http://code.ryanbruzan.net/nerveSlider/style.css">

Hint: Can't host the files yourself? Use the code above to link directly to them.

3 Make a div with any class or ID and throw in your img's. Attributes you can add to your img's can be viewed in the table below.

Apply any of the following attributes to any of your img elements.

Attribute Description Example Usage
slidecaption Applies a caption to that slide. Add an h1 for a cool heading. <img src="img.jpg" slidecaption="<h1>Title</h1>Text">
linkto Links that slide to the given value. <img src="img.jpg" linkto="http://www.ryanbruzan.net/">
linktarget Sets the Target attribute for the link. <img src="img.jpg" linkto="http://www.ryanbruzan.net/" linktarget="_blank">
imagescalemode Overrides the default scale mode for that slide. View options table below for allowed values. <img src="img.jpg" imagescalemode="fit">
<div class="iAmTest">
	<img src="test.jpg">
	<img src="test2.png">
	<img src="test3.gif">
	<!-- etc... -->
</div>

Another cool feature? You can put any content you want onto Nerve Slider! Just wrap your img in a div and create another div with a class of "content" inside. Then, write away!

<div class="iAmTest">
	<div>
		<img src="test.jpg">
		<div class="content">
			Anything can go here!  You're in control!
		</div>
	</div>
	<img src="test2.png">
	<img src="test3.gif">
	<!-- etc... -->
</div>

4 Set up Nerve Slider to your liking, using the div's class or ID you used in Step 3. There are several settings that come with Nerve Slider.

Double quotes (") are required around options whose default values are in double quotes. Options highlighted in red are still in testing. Use with caution.
Option Name Default Type Description
sliderWidth "1200px" String The width of the slider. Include units.
sliderHeight "500px" String The height of the slider. Include units.
sliderFullscreen false Boolean True/False If true, sets the slider as a backgound slideshow.
sliderAutoPlay true Boolean True/False If true, slides automatically start timed transitions.
slideTransition "slide" String The type of transition that will occur. Allowed values: "slide" | "fade"
slideTransitionDirection "left" String The direction in which the slide transitions. Only applicable when slideTransition is set to "slide". Allowed values: "up" | "right" | "down" | "left"
slideTransitionSpeed 1000 Number The speed of the transition, in milliseconds.
slideTransitionDelay 5000 Number The duration each slide is shown, in milliseconds.
slideTransitionEasing "swing" String The type of easing associated with the slide transition. May require jQueryUI.
slideImageScaleMode "fill" String The type of image sizing/positioning for each slide. Allowed values: "fit" | "fill" | "stretch" | "center" | "none"
slideShuffle false Boolean True/False If true, all slides will be displayed in a random order. Thanks to Joao Pedro for the idea!
slideReverse false Boolean True/False If true, all slides will be displayed in reverse order.
showFilmstrip false Boolean True/False If true, a set of thumbnails containing the slides will be shown on hover.
showCaptions true Boolean True/False If true, all captions will be displayed if applicable.
simultaneousCaptions false Boolean True/False If true, captions will appear or disappear in time with the slide transition.
showTimer true Boolean True/False If true, a timer showing the remaining duration of the current slide will be shown.
timerStartWidth "0%" String The starting width of the timer bar. Include units.
timerEndWidth "100%" String The ending width of the timer bar. Include units.
showPause true Boolean True/False If true, a pause/resume button will be shown on hover.
showArrows true Boolean True/False If true, arrows associated with previous/next slide functions will be shown.
showDots true Boolean True/False If true, a set of dots that correspond to each slide will be shown on hover.
showCounter true Boolean True/False If true, a counter showing the current slide out of the total number of slides will be shown.
showLoadingOverlay true Boolean True/False If true, a loading icon will be shown while the slide image is busy loading.
sliderTheme "light" String The theme the buttons, dots, and timer bar will aquire. Allowed values: "light" | "dark"
slidesDraggable true Boolean True/False If true, slides will become draggable, allowing users to drag & drop to navigate to the next/previous slide.
slidesDraggableMobileOnly false Boolean True/False If true, slidesDraggable will be overridden to "true" only if on a mobile device. Only applicable if slidesDraggable is set to "true".
slidesDragLimitFactor 5 Number The amount, divided from the current slider width/height, of space the user is required to drag in order for a function to be triggered. Only applicable if slidesDraggable is set to "true".
allowKeyboardEvents true Boolean True/False If true, the slider will listen to the keyboard keys. Left: previous | Up: previous | Right: next | Down: next | Escape: pause/resume
sliderResizable true Boolean True/False If true, the slider will adapt to the current parent size.
sliderKeepAspectRatio true Boolean True/False If true, the slider will resize and maintain shape. Only applicable if sliderResizable is set to "true".
preDelay 0 Number The amount of time the slider waits before beginning the timer, in milliseconds.
<script>
$(document).ready(function(){
	$(".iAmTest").startslider({
		// options...
		});
});
</script>

Controlling Nerve Slider - The API

API's highlighted in red are still in testing. Use with caution.
Function Description Example Usage
nextSlide() Jumps to the next slide. $(".yourSlider").nextSlide();
prevSlide() Jumps to the previous slide. $(".yourSlider").prevSlide();
gotoSlide(#) Jumps to the given slide number. $(".yourSlider").gotoSlide(2);
togglePause() Pauses or resumes the slider based on its current state. $(".yourSlider").togglePause();
fixImages() Repositions images inside slide. Only use for skewed or offset images. $(".yourSlider").fixImages();

Pro tip Videos in Nerve Slider

Using the content feature, you can add videos to Nerve Slider. Simply use a video's embed code and add it to your content div.

<div class="iAmTest">
	<div><div class="content">
		<iframe width="100%" height="100%" src="http://www.youtube.com/embed/nCgQDjiotG0?rel=0"></iframe>
	</div></div>
	<img src="test2.png">
	<img src="test3.gif">
	<!-- etc... -->
</div>
Download Files