Skip to content

Commit

Permalink
Fix no/before js load issue when using custom selector
Browse files Browse the repository at this point in the history
Changed '.slides > li' to '.slides > *' to prevent showing all slides before JS loads (or if it doesn't) when using custom selectors like {selector: ".slides > div"}.

Also removed .no-js from JS fallback to enable for users who don't have .no-js on body. No negative consequences as flexslider's inline styles overrule it. Also allows first slide to show if script file or plugin JS fails to load/run.
  • Loading branch information
lukechilds committed Jan 17, 2014
1 parent ce5441b commit e3e8507
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions flexslider.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/* FlexSlider Necessary Styles
*********************************/
.flexslider {margin: 0; padding: 0;}
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides > * {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {width: 100%; display: block;}
.flex-pauseplay span {text-transform: capitalize;}

Expand All @@ -47,9 +47,7 @@ html[xmlns] .slides {display: block;}
* html .slides {height: 1%;}

/* 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;}
.slides > *:first-child {display: block;}

/* FlexSlider Default Theme
*********************************/
Expand Down

0 comments on commit e3e8507

Please sign in to comment.