The Extras of Extra Buttons

Properties/Options Added by Extra Buttons
- add these to the on page new fadeslideshow() init, requires a valid togglerid value set

options Description
extrabuttons Optional. The basic options that govern the behavior of Extra Buttons for this slideshow. All it's properties are also optional. But some depend upon others having been specified. Their order is not important. Example Syntax:
extrabuttons: {pause: 6000, pauseplay: true, pend: '.bob', nextprevresume: false, navaction: 'mouseenter'}
The properties, are all optional:
  • pend - 'append', 'prepend', 'selector', or false (defaults to false) - if and how/where auto-generated buttons are added to the toggler division(s). This is perhaps the most important decision in configuring Extra Buttons. If specified, the Extra Buttons will be auto-generated. If set to 'append', they will be added to the end of the toggler division(s). If set to 'prepend', they will be added to the beginning of the toggler division(s). If set to a selector, the script will look inside the toggler division(s) for an element that has that selector and put the auto-generated buttons in it.

    If this is set to false or omitted, the script will look inside the toggler division(s) to find markup to associate with the Extra Buttons functions.

  • pause - number or false (defaults to false) - if slideshow should resume after a nav or next/prev button is clicked, the number of milliseconds to wait
  • pauseplay - true or false (defaults to false) - if pend is specified, should a pause/resume button be made (true), or separate stop and go buttons (false)
  • nextprevresume - true or false (defaults to true) - if pause is specified, should the next/prev buttons resume after it (true) or just the nav buttons (false)?
  • navaction - 'click' or 'mouseenter' (defaults to 'click') - if navbut buttons are used, do they activate on click ('click') or on mouseenter ('mouseenter')?
  • navfade - an unquoted decimal fraction like 0.7 or false (defaults to false) - if navbut buttons are used, should they be dimmed unless active or hovered? If so, give the decimal fraction of how dim (css opacity, gets translated to its equivalent in older IE) they should be when mouse is out and they're not active.
  • navbutonly - true or false (defaults to false) - requires a valid pend value other than false - should only the navbut buttons be generated? If true it will leave you free to make your own pause/play combo or a stop and/or go buttons in the toggler division.
onbeforeslide Optional. Custom function to execute just before the image changes. The index parameter represents the 0 based index of which image the show will change to. The keyword this initially refers to the fadeslideshow instance. Example Syntax:
onbeforeslide: function(index){
	var lng = this.setting.imagearray.length;
	this.setting.$nav.removeClass('highlight').each(function(i){
		if(i % lng === index){
			this.className += ' highlight';
		}
	});
}
The above would add the highlight class to the active navbut button.
onpauseplayswitch

Requires pauseplay button(s)

Optional - requires pauseplay button(s) - pauseplay classed button(s) in the toggler division(s) markup OR a valid extrabuttons.pend value and extrabuttons.pauseplay: true. Custom function to execute when pauseplay button(s) change. The pauseplaybuts parameter represents the jQuery object containing any and all pauseplay buttons for this slideshow. The keyword this initially refers to the fadeslideshow instance. Example Syntax:
onpauseplayswitch: function(pauseplaybuts){
	var ppstatus = this.setting.$togglerdiv.find('.pauseplaystatus');
	if(pauseplaybuts.hasClass('running')){
		ppstatus.html('running');
	} else {
		ppstatus.html('paused');
	}
}
The above would populate span(s) and/or division(s) within the toggler division(s) that have a class of pauseplaystatus with the paused/running state of the slideshow.
running

Requires a valid extrabuttons.pend and extrabuttons.pauseplay: true

Optional. When using extrabuttons.pend and extrabuttons.pauseplay, this is a string representing the markup for the auto-generated pauseplay button(s) when the slideshow is running. Example:

running: '<img src="pause.gif" alt="pause" title="Pause">'

Defaults to:

'<input type="button" value="Pause" />'

paused

Requires a valid extrabuttons.pend and extrabuttons.pauseplay: true

Optional. When using extrabuttons.pend and extrabuttons.pauseplay, this is a string representing the markup for the auto-generated pauseplay button(s) when the slideshow is paused. Example:

paused: '<img src="resume.gif" alt="play" title="Play">'

Defaults to:

'<input type="button" value="Play" />'

stopbut

Requires a valid extrabuttons.pend and extrabuttons.pauseplay: false or omitted

Optional. When using extrabuttons.pend and not extrabuttons.pauseplay, this is a string representing the markup for the auto-generated stop button(s). Example:

stopbut: '<img src="stop.gif" alt="stop" title="Stop">'

Defaults to:

'<input type="button" value="Stop" />'

gobut

Requires a valid extrabuttons.pend and extrabuttons.pauseplay: false or omitted

Optional. When using extrabuttons.pend and not extrabuttons.pauseplay, this is a string representing the markup for the auto-generated go button(s). Example:

gobut: '<img src="go.gif" alt="go" title="Go">'

Defaults to:

'<input type="button" value="Go" />'

navbut

Requires a valid extrabuttons.pend

Optional. When using extrabuttons.pend, this is a string representing the markup for the auto-generated navigation buttons. Example:

navbut: '<img src="navimage_%i.gif" alt="goto image %c" title="Image #%c">'

Defaults to:

'<input type="button" value="%c" />'

The %c token will be replaced by the current image count (count of the images from 1 to whatever). The %i token will do the same, but with the current image index starting at 0.

Example Usages - Note: As explained in the above table, not all options may be used together, and others require other options be specified in order to have an effect: