Skip to content

Commit

Permalink
FlexSlider v1.5 official release. Improvements focus on usability for…
Browse files Browse the repository at this point in the history
… mobile devices and javascript fallback.
  • Loading branch information
Tyler Smith committed Aug 27, 2011
1 parent a7ff794 commit 890ec27
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
8 changes: 7 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jQuery FlexSlider v1.4
jQuery FlexSlider v1.5
http://flex.madebymufffin.com

Copyright (c) 2011 Tyler Smith
Expand All @@ -7,9 +7,15 @@ Copyright (c) 2011 Tyler Smith

Changelog:

v1.5 (2011-08-27)
- Improved mobile support by adding "touchstart" to bound events
- Implemented solution for no javascript fallback (relies on user, and prepares for html5 boilerplate/modernizr classes)
--

v1.4 (2011-08-23)
- Added "manualControls" property to allow for custom, non-dynamic control navigation
- Added "show" animation to allow for instant transitions between slides
--

v1.3 (2011-08-18)
- Made slide animation a continuous scroll effect, rather than jumping back to start/end
Expand Down
16 changes: 11 additions & 5 deletions flexslider.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v1.4
* jQuery FlexSlider v1.5
* http://flex.madebymufffin.com
*
* Copyright 2011, Tyler Smith
Expand All @@ -19,6 +19,12 @@
.flex-control-nav,
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}

/* No JavaScript Fallback */
/* If you are not using another script, such as Modernizr, make sure you
* include js that eliminates this class on page load
*/
.no-js .slides li:first-child {display: block;}


/* FlexSlider Default Theme
*********************************/
Expand All @@ -31,14 +37,14 @@
.flex-caption {width: 96%; padding: 2%; position: absolute; left: 0; bottom: 0; background: rgba(0,0,0,.3); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.3); font-size: 14px; line-height: 18px;}

/* Direction Nav */
.flex-direction-nav li a {width: 52px; height: 52px; margin: -13px 0 0; display: block; background: url(../images/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 50%; cursor: pointer; text-indent: -9999px;} /* set negative margin-top equal to half the height on the directional-nav for perfect vertical centering */
.flex-direction-nav li a.next {background-position: -52px 0; right: -25px;}
.flex-direction-nav li a.prev {background-position: 0 0; left: -17px;}
.flex-direction-nav li a {width: 52px; height: 52px; margin: -13px 0 0; display: block; background: url(theme/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 50%; cursor: pointer; text-indent: -9999px;} /* set negative margin-top equal to half the height on the directional-nav for perfect vertical centering */
.flex-direction-nav li a.next {background-position: -52px 0; right: -21px;}
.flex-direction-nav li a.prev {background-position: 0 0; left: -20px;}

/* Control Nav */
.flex-control-nav {width: 100%; position: absolute; bottom: -30px; text-align: center;}
.flex-control-nav li {margin: 0 0 0 5px; display: inline-block; zoom: 1; *display: inline;}
.flex-control-nav li:first-child {margin: 0;}
.flex-control-nav li a {width: 13px; height: 13px; display: block; background: url(../images/bg_control_nav.png) no-repeat 0 0; cursor: pointer; text-indent: -9999px;}
.flex-control-nav li a {width: 13px; height: 13px; display: block; background: url(theme/bg_control_nav.png) no-repeat 0 0; cursor: pointer; text-indent: -9999px;}
.flex-control-nav li a:hover {background-position: 0 -13px;}
.flex-control-nav li a.active {background-position: 0 -26px; cursor: default;}
5 changes: 3 additions & 2 deletions jquery.flexslider-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions jquery.flexslider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v1.4
* jQuery FlexSlider v1.5
* http://flex.madebymufffin.com
*
* Copyright 2011, Tyler Smith
Expand Down Expand Up @@ -38,10 +38,10 @@
slider = this,
container = $('.slides', slider),
slides = $('.slides li', slider),
length = slides.length;
length = slides.length,
ANIMATING = false,
currentSlide = options.slideToStart;

currentSlide = options.slideToStart,
eventType = ('ontouchstart' in document.documentElement) ? 'touchstart' : 'click';

///////////////////////////////////////////////////////////////////
// FLEXSLIDER: RANDOMIZE SLIDES
Expand Down Expand Up @@ -141,7 +141,7 @@

controlNav.eq(currentSlide).addClass('active');

controlNav.click(function(event) {
controlNav.bind(eventType, function(event) {
event.preventDefault();

if ($(this).hasClass('active') || ANIMATING) {
Expand Down Expand Up @@ -171,7 +171,7 @@
slider.append($('<ul class="flex-direction-nav"><li><a class="prev" href="#">' + options.prevText + '</a></li><li><a class="next" href="#">' + options.nextText + '</a></li></ul>'));
}

$('.flex-direction-nav li a').click(function(event) {
$('.flex-direction-nav li a').bind(eventType, function(event) {
event.preventDefault();
if (ANIMATING) {
return;
Expand Down

0 comments on commit 890ec27

Please sign in to comment.