Makes a very, very simple slideshow gallery with a collection of dom elements and previous and next buttons.
Aaron Newton
| mootools | Moo.js, Utility.js, Common.js, Function.js, Array.js, String.js, Element.js, Fx.Base.js, Dom.js, Cookie.js |
| simple. slideshow.js | Makes a very, very simple slideshow gallery with a collection of dom elements and previous and next buttons. |
| SimpleSlideShow | Makes a very, very simple slideshow gallery with a collection of dom elements and previous and next buttons. |
| Properties | |
| cycleForward | Shows the next slide. |
| cycleBack | Shows the prev slide. |
| showSlide | Shows a specific slide. |
| SimpleImageSlideShow | Extends SimpleSlideShow to make a slideshow of images. |
| Properties | |
| addImg | Adds a new image to the group |
| Change Log | $Source: /cvs/main/flatfile/html/rb/js/global/cnet.global.framework/common/layout.widgets/simple.slideshow.js,v $ $Log: simple.slideshow.js,v $ Revision 1.9 2007/05/29 22:01:53 newtona Split element.cnet.js into seperate files; updated docs in files to note this Changed element.visible to element.isVisible (left old namespace for legacy support) Fixed Element.empty in prototype.compatibility.js Removed as many dependencies in common code to element.*.js as possible (espeically element.shortcuts.js) |
Makes a very, very simple slideshow gallery with a collection of dom elements and previous and next buttons.
| options | an object with key/value settings. |
| startIndex | (integer) the first image to show |
| slides | (array) a collection of elements already in the dom. |
| currentSlideClass | (string; optional) class to assign the currently visible slide; defaults to “currentSlide” |
| currentIndexContainer | (dom element or id) container to display the the currently shown slide index (i.e. “showing 2 of 3”); optional |
| maxContainer | (dom element or id) container to display the maximum number of slides available; optional |
| nextImg | (dom element or id) image to capture clicks to show the next image; optional, but if not supplied you’ll have to execute cycleForward yourself. |
| prevImg | (dom element or id) image to capture clicks to show the next image; optional, but if not supplied you’ll have to execute cycleBack yourself. |
| wrap | (boolean) when the user clicks next at the end of a set, go back to the start (and if they click prev at the begining, go to the end); defaults to true |
| disabledLinkClass | (string) class to add to next/prev links when there are no next or prev slides; defaults to “disabled” |
| onNext | (function) callback for when the user clicks next; optional |
| onPrev | (function) callback for when the user clicks prev; optional |
| onSlideClick | (function) callback for when the user clicks a slide, this function will be passed the slide clicked and the index of the slide. optional |
| crossFadeOptions | (object) options object to be passed to the opacity effects. |
new SimpleSlideShow({
startIndex: 0,
slides: $$('.slide'),
currentIndexContainer: 'slideNow', //an element or it's id
maxContainer: 'slideMax',
nextLink: 'nextImg',
prevLink: 'prevImg'
});| Properties | |
| cycleForward | Shows the next slide. |
| cycleBack | Shows the prev slide. |
| showSlide | Shows a specific slide. |
Extends SimpleSlideShow to make a slideshow of images.
| options | a key/value options object; inherits options from SimpleSlideShow. |
| imgUrls | (array; optional) an array of image urls to add to the dom and to the slideshow |
| imgClass | (string; optional) a class to add to the images that get created on the fly |
| container | (element; optional) if you are adding images to the dom either using addImg or the imgUrls array above, then “container” is required to know where to put them. |
| Properties | |
| addImg | Adds a new image to the group |
$Source: /cvs/main/flatfile/html/rb/js/global/cnet.global.framework/common/layout.widgets/simple.slideshow.js,v $ $Log: simple.slideshow.js,v $ Revision 1.9 2007/05/29 22:01:53 newtona Split element.cnet.js into seperate files; updated docs in files to note this Changed element.visible to element.isVisible (left old namespace for legacy support) Fixed Element.empty in prototype.compatibility.js Removed as many dependencies in common code to element.*.js as possible (espeically element.shortcuts.js)
Revision 1.8 2007/04/03 00:12:41 newtona fixed a binding issue with slideshow
Revision 1.7 2007/03/29 22:37:54 newtona simple slide show now only cross-fades in ie6 if the element has a bgcolor (see Element.fxOpacityOk)
Revision 1.6 2007/03/20 21:30:21 newtona slideshow now checks to see if there are any slides before it attempts to show one.
Revision 1.5 2007/03/19 22:26:38 newtona start slide is now shown on initialization
Revision 1.4 2007/03/08 23:29:59 newtona strict javascript warnings cleaned up
Revision 1.3 2007/02/21 00:29:17 newtona switched Class.create to Class.empty
Revision 1.2 2007/02/12 17:46:31 newtona tweaking things, no significant functional changes
Revision 1.1 2007/02/09 20:23:19 newtona moving simple.img.gallery.js to simple.slideshow.js rewrote gallery to do dom elements or images
function $A( array, start, length )
Use to iterate through iterables that are not regular arrays, such as builtin getElementsByTagName calls, arguments of a function, or an object.
function $each( iterable, fn, bind )
returns the element passed in with all the Element prototypes applied.
function $( el )