Skip to content

Commit

Permalink
removed autoPlay dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Jul 7, 2011
1 parent a11d4e5 commit 7add433
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 116 deletions.
170 changes: 81 additions & 89 deletions demos.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demos/css/page.css
Expand Up @@ -14,7 +14,7 @@ h5, .header { font: bold 15px Georgia, Serif; text-align: center; }
pre, code { font: 13px/1.8 Monaco, MonoSpace; margin: 0 0 15px 0; padding: 5px; background: #f5f5f5; block: inline; width: 100%; overflow-x: auto; }
blockquote { margin-left: 30px; }

ul { margin: 0 0 25px 25px; }
ul { margin: 0; padding-left: 35px; }
ul li { font: 15px Georgia, Serif; margin: 0 0 8px 0; }

#nav { display: block; width: auto; margin: 10px auto; text-align: center; white-space: nowrap; line-height: 3em; }
Expand Down
3 changes: 0 additions & 3 deletions demos/js/demo.js
Expand Up @@ -8,7 +8,6 @@ $(document).ready(function(){

$('#slider1')
.anythingSlider({
startStopped : true,
toggleControls : true,
theme : 'metallic',
navigationFormatter : function(i, panel){
Expand All @@ -28,7 +27,6 @@ $(document).ready(function(){

$('#slider2')
.anythingSlider({
startStopped : true,
resizeContents : false,
navigationFormatter : function(i, panel){
return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2', 'Test'][i - 1];
Expand Down Expand Up @@ -67,7 +65,6 @@ $(document).ready(function(){

$('#slider3')
.anythingSlider({
startStopped : true,
navigationFormatter : function(i, panel){
return ['Top', 'Right', 'Bottom', 'Left'][i - 1];
}
Expand Down
5 changes: 2 additions & 3 deletions expand.html
Expand Up @@ -22,14 +22,13 @@
$('#slider1').anythingSlider({
// theme : 'metallic',
expand : true,
startStopped : false
autoPlay : true
});

$('#slider2').anythingSlider({
expand : true,
showMultiple : 2,
changeBy : 2,
startStopped : true
changeBy : 2
});

});
Expand Down
18 changes: 12 additions & 6 deletions index.html
Expand Up @@ -95,7 +95,6 @@
$(function(){

$('#slider1').anythingSlider({
startStopped : true, // If autoPlay is on, this can force it to start stopped
theme : 'metallic',
easing : 'easeInOutBack',
// autoPlayLocked : true, // If true, user changing slides will not stop the slideshow
Expand All @@ -107,7 +106,6 @@

$('#slider2').anythingSlider({
resizeContents : false, // If true, solitary images/objects in the panel will expand to fit the viewport
startStopped : true, // If autoPlay is on, this can force it to start stopped
navigationFormatter : function(index, panel){ // Format navigation labels with text
return ['Recipe', 'Quote', 'Image', 'Quote #2', 'Image #2'][index - 1];
}
Expand Down Expand Up @@ -344,6 +342,14 @@ <h2>Changelog</h2>
Only the latest versions will be shown here. See the <a href="https://github.com/ProLoser/AnythingSlider/wiki/Change-Log">full change log here</a>.<br>
<br>

<h3>Version 1.7.2</h3>
<ul>
<li>Removed <code>autoPlay</code>'s dependency on <code>buildStartStop</code> so now they are completely independent. Thanks to <a href="https://github.com/ProLoser/AnythingSlider/pull/136">Helmer</a>.</li>
<li>Changed <code>autoPlayLocked</code> being defaulted to <code>false</code> when <code>autoPlay</code> instead of <code>buildStartStop</code> is <code>false</code>. Which was just added in version 1.7.</li>
<li>Updated demos.html page code to match changes made in version 1.7.</li>
<li>Cleaned up demo pages and made them "more" HTML5 valid. Only the provided iframe and embed codes from YouTube & Vimeo cause errors now.</li>
</ul>

<h3>Version 1.7.1</h3>
<ul>
<li>Fixed <code>delay</code> option being divided by two. Fix for <a href="https://github.com/ProLoser/AnythingSlider/issues/131">issue #131</a>.</li>
Expand All @@ -352,15 +358,15 @@ <h3>Version 1.7.1</h3>
<h3>Version 1.7</h3>
<ul>
<li>Removed <code>width</code> and <code>height</code> options. These are now set in the css. Enhancement suggested in <a href="https://github.com/ProLoser/AnythingSlider/issues/125">issue #125</a>.</li>
<li>Removed <code>maxOverallWidth</code> option.
<ul><br>
<li>Removed <code>maxOverallWidth</code> option.<br>
<ul>
<li>This option was in place to ensure that the slider did not exceed Opera's 32766 pixel maximum width restriction.</li>
<li>Added <code>.anythingBase { max-width: 32766px; }</code> to the css.</li>
</ul>
</li>
<li>Removed <code>clickArrows</code> and replaced it with <code>clickForwardArrow</code> &amp; <code>clickBackArrow</code> to allow for jQuery Mobile users to add "swipeLeft" &amp; "swipeRight".</li>
<li>Changed <code>autoPlay</code>:
<ul><br>
<li>Changed <code>autoPlay</code>:<br>
<ul>
<li>Split <code>autoPlay</code> functionality, so that setting the new <code>buildStartStop</code> option to <code>true</code> will now build the start stop button.</li>
<li>Now, when <code>autoPlay</code> is <code>true</code>, the slideshow will now start automatically. Default set to <code>false</code>.</li>
</ul>
Expand Down
16 changes: 7 additions & 9 deletions js/jquery.anythingslider.js
@@ -1,5 +1,5 @@
/*
AnythingSlider v1.7.1
AnythingSlider v1.7.2
Original by Chris Coyier: http://css-tricks.com
Get the latest version: https://github.com/ProLoser/AnythingSlider
Expand Down Expand Up @@ -53,7 +53,7 @@

// Set up a few defaults & get details
base.flag = false; // event flag to prevent multiple calls (used in control click/focusin)
base.playing = false; // slideshow state
base.playing = o.autoPlay; // slideshow state; removed "startStopped" option
base.slideshow = false; // slideshow flag
base.hovered = false; // actively hovering over the slider
base.panelSize = []; // will contain dimensions and left position of each panel
Expand All @@ -71,17 +71,15 @@
base.checkResize();
}

// If autoPlay functionality is included, then initialize the settings
if (o.buildStartStop) {
base.playing = o.autoPlay; // Sets the playing variable; removed "startStopped" option
base.buildAutoPlay();
} else {
o.autoPlayLocked = false; // prevent autoPlayLocked from working if there is no start stop
}
// Build start/stop button
if (o.buildStartStop) { base.buildAutoPlay(); }

// Build forwards/backwards buttons
if (o.buildArrows) { base.buildNextBackButtons(); }

// can't lock autoplay it if it's not enabled
if (!o.autoPlay) { o.autoPlayLocked = false; }

base.updateSlider();

base.$lastPage = base.$currentPage;
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.anythingslider.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions video.html
Expand Up @@ -29,7 +29,6 @@
// DOM Ready
$(function(){
$('#slider').anythingSlider({
startStopped : true, // If autoPlay is on, this can force it to start stopped
resizeContents : true,
addWmodeToObject : 'transparent',
navigationFormatter : function(index, panel){ // Format navigation labels with text
Expand Down Expand Up @@ -93,12 +92,12 @@
<!-- Video compatibility table -->
<div class="video-info">
<h2>AnythingSlider Video Extension Compatibility</h2>
<table cellspacing="0" cellpadding="0" border="1" class="data">
<table border="1" class="data">
<thead>
<tr>
<th rowspan="2">Video Type</th>
<th rowspan="2">Function</th>
<th colspan="8">Browser</th>
<th colspan="7">Browser</th>
</tr>
<tr>
<th class="header">FF</th>
Expand Down

0 comments on commit 7add433

Please sign in to comment.