diff --git a/README.textile b/README.textile index be634c2..deec991 100644 --- a/README.textile +++ b/README.textile @@ -1,196 +1,18 @@ -h1. SlidesJS version 2.0 beta 1 +h1. SlidesJS is obsolete and no longer maintained -**SlidesJS version 2.0 beta 1 is not meant for production deployment.** +This repo is kept around for archival purposes. ✌️ -For the current production ready version of SlidesJS visit "http://slidesjs.com/":http://slidesjs.com/. +h2. SlidesJS 3.0 -Created by "Nathan Searles":mailto:nsearles@gmail.com, "http://nathansearles.com":http://nathansearles.com +SlidesJS is a responsive slideshow plug-in for jQuery (1.7.1+) with features like touch and CSS3 transitions. Support forum "http://groups.google.com/group/slidesjs":http://groups.google.com/group/slidesjs -(c) 2011 by Nathan Searles +(c) 2013 by Nathan Searles -h2. SlidesJS 2 Demos +h2. Documentation -* "Standard":http://beta.slidesjs.com/examples/standard/ -* "Responsive":http://beta.slidesjs.com/examples/responsive/ (kinda buggy, working on that) -* "Browser Window":http://beta.slidesjs.com/examples/browser-window/ - -h3. Soon to be added demos -* Carousel Style -** 3 or 4 items per slide, could be album covers or similar -* Thumbnails -** Pagination with thumbnails -* Captions -** Image slideshow with captions -* Side Navigation -** With vertical slideshow -* Play/pause -** Image slideshow with play/pause button, pagination, next/prev buttons - -h2. SlidesJS 2 documentation - -h3. Basic Markup Structure - -For just images you can simply use: - -
- Slide 1 - Slide 2 - Slide 3 - Slide 4 -
- -Or you can use <div>s for your slides - -
-
- Slide 1 -
-
- Slide 2 -
-
- Slide 3 -
-
- Slide 4 -
-
- -Simple as that. No extra <div>s, no navigation or pagination to define, it's all created for you. SlidesJS creates two <div>s for the slideshow, ".slidesContainer" and ".slidesControl", both are required and can not be changed. - -Navigation classes are ".slidesPrevious" and ".slidesNext" and are created as anchor tags. These cannot be changed. - -Pagination uses an unordered list markup structure. The <ul> has a class of ".slidesPagination". This cannot be changed. - -You may define your own navigation or pagination, but they must use the same class names, sorry it saves from including extraneous code. - -h3. Basic CSS - -No CSS required. Shit yeah! - -h3. Initialize SlidesJS - -
- -Tip: With SidesJS 2 you need to define the width and height if it's different from the default (780px x 300px). This resolves many issues having to do with loading and makes SlidesJS 2 self contained, not requiring any CSS. - -
- -h3. Method Calls - The good stuff - -h4. Play - -
$("#slides").slides("play");
- -h4. Pause - -
$("#slides").slides("pause");
- -h4. Stop - -
$("#slides").slides("stop");
- -h4. Next, using default effect - -
$("#slides").slides("next");
- -h4. Next, define effect, "slide" or "fade" - -
$("#slides").slides("next","fade");
- -h4. Previous, uses default effect - -
$("#slides").slides("previous");
- -h4. Previous, define effect, "slide" or "fade" - -
$("#slides").slides("previous","fade");
- -h4. Goto slide 2 using default effect - -
$("#slides").slides("slide",2);
- -h4. Goto slide 2 define effect, "slide" or "fade" - -
$("#slides").slides("slide",4,"fade");
- -h4. Update - -
$("#slides").slides("update");
- -h4. Destroy - -
$("#slides").slides("destroy");
- - -h4. Status - -
$("#slides").slides("status");
- -Returns JSON object: -
{
- current: 4,
- state: "playing",
- total: 7
-}
- -The follow could also be used - -
$("#slides").slides("status","current");
- -returns: number - -
$("#slides").slides("status","state");
- -returns: string, playing, paused, stopped, undefined - -
$("#slides").slides("status","total");
- -returns: number - -h3. Options - -
width: 780, // [Number] Define the slide width
-responsive: false, // [Boolean] slideshow will scale to its container
-height: 300, // [Number] Define the slide height
-navigation: true, // [Boolean] Auto generate the naviagation, next/previous buttons
-pagination: true, // [Boolean] Auto generate the pagination
-effects: {
- navigation: "slide",  // [String] Can be either "slide" or "fade"
- pagination: "slide" // [String] Can be either "slide" or "fade"
-},
-direction: "left", // [String] Define the slide direction: "Up", "Right", "Down", "left"
-fade: {
- interval: 1000, // [Number] Interval of fade in milliseconds
- crossfade: false, // [Boolean] TODO: add this feature. Crossfade the slides, great for images, bad for text
- easing: "" // [String] Dependency: jQuery Easing plug-in 
-},
-slide: {
- interval: 1000, // [Number] Interval of fade in milliseconds
- browserWindow: false, // [Boolean] Slide in/out from browser window, bad ass
- easing: "" // [String] Dependency: jQuery Easing plug-in 
-},
-preload: {
- active: true, // [Boolean] Preload the slides before showing them, this needs some work
- image: "../img/loading.gif" // [String] Define the path to a load .gif, yes I should do something cooler
-},
-startAtSlide: 1, // [Number] What should the first slide be?
-playInterval: 5000, // [Number] Time spent on each slide in milliseconds
-pauseInterval: 8000, // [Number] Time spent on pause, triggered on any navigation or pagination click
-autoHeight: false // [Boolean] TODO: add this feature. Auto sets height based on each slide
+SlidesJS version 3.0 documentation is available at "http://slidesjs.com/":http://slidesjs.com/ h2. License @@ -207,81 +29,5 @@ See the License for the specific language governing permissions and limitations under the License. h2. Changelog -* 2.0 beta 1 -** Complete rewrite using method based pattern - -* 1.1.8 -** Fixed: bug with preloading image and starting at a slide other then the first - -* 1.1.7 -** Added currentClass default, thanks arronmabrey! - -* 1.1.6 -** Fixed: bug with slidesLoaded function - -* 1.1.5 -** New: option called slidesLoaded, a function that is called when Slides is fully loaded - -* 1.1.4 -** Fixed: Minor bug with loading image not being removed -** Added: animationStart() now gets passed the current slide number -** Updated: Examples now use jQuery 1.5.1 - -* 1.1.3 -** New: Support for jQuery's easing plugin -*** Added: fadeEasing and slideEasing defaults -** Cleaned up JavaScript using http://jshint.com -** Fixed: Minor bug with hoverPause - -* 1.1.2 -** Changed: Width and Height is set in the CSS rather then the JavaScript -** New: Added some helpful comments to example CSS -** Fixed: Flash of slide content in IE -** Updated: Better loading structure - -* 1.1.1 -** New: Width and height is now a required attribute -*** This fixes numerous issues with blank slides and height -** New: Rewrote image loading -*** Now supports multiple parent elements -*** Fixed other minor bugs -** Fixed: Images should no longer flicker in IE - -* 1.1.0 -** Fixed: Issue with images and captions example in IE6/7 - -* 1.0.9 -** Fixed: Using fade effect, crossfade and autoheight now works properly - -* 1.0.8 -** Fixed: IE6/7 JavaScript error related to the pagination - -* 1.0.7 -** New: Link to a slide from a slide. Check out /examples/Linking/ in the download -** New: Deeplinking example added. Check out /examples/Linking/ in the download -** Changed: Pagination no longer uses rel attribute, it now just uses href with hash - -* 1.0.6 -** Changed: Pagination now targets the rel attribute versus using :eq() - -* 1.0.5 -** New: Current slide number passed to animationComplete() - -* 1.0.4 -** Fixed: start option bug -** New: error correction for start option - -* 1.0.3 -** Fixed: bugs related to auto height -** New: animationStart() and animationComplete() added - -* 1.0.2 -** Fixed: bug with static pagination - -* 1.0.1 -** New: boolean to auto generated Next/Prev buttons -** Width attribute is no longer set for main element -** Fixed: pagination bug, it was set to false, should be true by default -* 1.0 -** Initial release \ No newline at end of file +* 3.0 Initial release diff --git a/examples/basic-fade/img/example-slide-1.jpg b/examples/basic-fade/img/example-slide-1.jpg new file mode 100644 index 0000000..1d6fa22 Binary files /dev/null and b/examples/basic-fade/img/example-slide-1.jpg differ diff --git a/examples/basic-fade/img/example-slide-2.jpg b/examples/basic-fade/img/example-slide-2.jpg new file mode 100644 index 0000000..9d8d054 Binary files /dev/null and b/examples/basic-fade/img/example-slide-2.jpg differ diff --git a/examples/basic-fade/img/example-slide-3.jpg b/examples/basic-fade/img/example-slide-3.jpg new file mode 100644 index 0000000..89f8912 Binary files /dev/null and b/examples/basic-fade/img/example-slide-3.jpg differ diff --git a/examples/basic-fade/img/example-slide-4.jpg b/examples/basic-fade/img/example-slide-4.jpg new file mode 100644 index 0000000..b0648a2 Binary files /dev/null and b/examples/basic-fade/img/example-slide-4.jpg differ diff --git a/examples/basic-fade/index.html b/examples/basic-fade/index.html new file mode 100644 index 0000000..bf60f0b --- /dev/null +++ b/examples/basic-fade/index.html @@ -0,0 +1,110 @@ + + + + + SlidesJS Basic Code Example + + + + + + + + + + + + + + + +
+
+ Photo by: Missy S Link: http://www.flickr.com/photos/listenmissy/5087404401/ + Photo by: Daniel Parks Link: http://www.flickr.com/photos/parksdh/5227623068/ + Photo by: Mike Ranweiler Link: http://www.flickr.com/photos/27874907@N04/4833059991/ + Photo by: Stuart SeegerLink: http://www.flickr.com/photos/stuseeger/97577796/ +
+
+ + + + + + + + + + + + + + + diff --git a/examples/basic-fade/js/jquery.slides.min.js b/examples/basic-fade/js/jquery.slides.min.js new file mode 100644 index 0000000..427e06b --- /dev/null +++ b/examples/basic-fade/js/jquery.slides.min.js @@ -0,0 +1,7 @@ +/* + SlidesJS 3.0.4 http://slidesjs.com + (c) 2013 by Nathan Searles http://nathansearles.com + Updated: June 26th, 2013 + Apache License: http://www.apache.org/licenses/LICENSE-2.0 +*/ +(function(){(function(e,t,n){var r,i,s;s="slidesjs";i={width:940,height:528,start:1,navigation:{active:!0,effect:"slide"},pagination:{active:!0,effect:"slide"},play:{active:!1,effect:"slide",interval:5e3,auto:!1,swap:!0,pauseOnHover:!1,restartDelay:2500},effect:{slide:{speed:500},fade:{speed:300,crossfade:!0}},callback:{loaded:function(){},start:function(){},complete:function(){}}};r=function(){function t(t,n){this.element=t;this.options=e.extend(!0,{},i,n);this._defaults=i;this._name=s;this.init()}return t}();r.prototype.init=function(){var n,r,i,s,o,u,a=this;n=e(this.element);this.data=e.data(this);e.data(this,"animating",!1);e.data(this,"total",n.children().not(".slidesjs-navigation",n).length);e.data(this,"current",this.options.start-1);e.data(this,"vendorPrefix",this._getVendorPrefix());if(typeof TouchEvent!="undefined"){e.data(this,"touch",!0);this.options.effect.slide.speed=this.options.effect.slide.speed/2}n.css({overflow:"hidden"});n.slidesContainer=n.children().not(".slidesjs-navigation",n).wrapAll("
",n).parent().css({overflow:"hidden",position:"relative"});e(".slidesjs-container",n).wrapInner("
",n).children();e(".slidesjs-control",n).css({position:"relative",left:0});e(".slidesjs-control",n).children().addClass("slidesjs-slide").css({position:"absolute",top:0,left:0,width:"100%",zIndex:0,display:"none",webkitBackfaceVisibility:"hidden"});e.each(e(".slidesjs-control",n).children(),function(t){var n;n=e(this);return n.attr("slidesjs-index",t)});if(this.data.touch){e(".slidesjs-control",n).on("touchstart",function(e){return a._touchstart(e)});e(".slidesjs-control",n).on("touchmove",function(e){return a._touchmove(e)});e(".slidesjs-control",n).on("touchend",function(e){return a._touchend(e)})}n.fadeIn(0);this.update();this.data.touch&&this._setuptouch();e(".slidesjs-control",n).children(":eq("+this.data.current+")").eq(0).fadeIn(0,function(){return e(this).css({zIndex:10})});if(this.options.navigation.active){o=e("",{"class":"slidesjs-previous slidesjs-navigation",href:"#",title:"Previous",text:"Previous"}).appendTo(n);r=e("",{"class":"slidesjs-next slidesjs-navigation",href:"#",title:"Next",text:"Next"}).appendTo(n)}e(".slidesjs-next",n).click(function(e){e.preventDefault();a.stop(!0);return a.next(a.options.navigation.effect)});e(".slidesjs-previous",n).click(function(e){e.preventDefault();a.stop(!0);return a.previous(a.options.navigation.effect)});if(this.options.play.active){s=e("",{"class":"slidesjs-play slidesjs-navigation",href:"#",title:"Play",text:"Play"}).appendTo(n);u=e("",{"class":"slidesjs-stop slidesjs-navigation",href:"#",title:"Stop",text:"Stop"}).appendTo(n);s.click(function(e){e.preventDefault();return a.play(!0)});u.click(function(e){e.preventDefault();return a.stop(!0)});this.options.play.swap&&u.css({display:"none"})}if(this.options.pagination.active){i=e("