You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the creation of the Start/stop button is bound to autoplay true/false.
I'd think it would be better, if the creation would be bound to a seperate parameter buildStartStopButton, just like the creation of the other navigation elements have their own params.
I've thought about separating out this option... but I'd hate to add more options and have it be more confusing. Maybe I need a better way to organize the options.
Do you have any suggestions on maybe grouping options together? I've been thinking about doing something like what I have below, but I think there is a bigger chance of messing up with trailing commas and confusion, what do you think?
$('#slider').anythingSlider({// Appearanceappearance : {width : null,// Override the default CSS widthheight : null,// Override the default CSS heightexpand : false,// If true, the entire slider will expand to fit the parent elementresize : true,// "resizeContents" - If true, solitary images/objects in the panel will expand to fit the viewportmultiple : false,// "showMultiple" - Set this value to a number and it will show that many slides at onceinfinite : true,// "infiniteSlides" - if false, the slider will not wrapstart : 1,// "startPanel" - This sets the initial paneltheme : 'default'// Theme name},// Controls - combined navigation and slideshow controlscontrols : {appendTo : null,// "appendControlsTo" - A HTML element (jQuery Object, selector or HTMLNode) to which the controls will be appended if not nulltoggle : false// "toggleControls" - if true, slide in controls (navigation + play/stop button) on hover and slide change, hide @ other times},// Navigationnavigation : {build : true,// "buildNavigation" - If true, builds a list of anchor links to link to each panelenable : true,// "enableNavigation" - if false, navigation links will still be visible, but not clickable.format : null,// "navigationFormatter" - Details at the top of the file on this use (advanced use)hash : true,// "hashTags" - Should navigation links change the hashtag in the URL?tooltip : 'tooltip'// "tooltipClass" - Class added to navigation & start/stop button (text copied to title if it is hidden by a negative text indent)},// Arrowsarrows: {build : true,// "buildArrows" - If true, builds the forwards and backwards buttonstoggle : false,// "toggleArrows" - If true, side navigation arrows will slide out on hovering & hide @ other timeschange : 1,// "changeBy" - Amount to go forward or back when changing panels.forwardText : "»",// Link text used to move the slider forward (hidden by CSS, replaced with arrow image)backText : "«",// Link text used to move the slider back (hidden by CSS, replace with arrow image)keyboard : true// "enableKeyboard" - if false, keyboard arrow keys will not work for the current panel.},// Slideshow optionsslideShow: {build : true,// build it *new*enable : true,// "enablePlay" - if false, the play/stop button will still be visible, but not clickable.start : true,// "autoPlay" - **changed** now this functions like the "startStopped" optionlock : false,// "autoPlayLocked" - If true, user changing slides will not stop the slideshowpause : true,// "pauseOnHover" - If true & the slideshow is active, the slideshow will pause on hoveronce : false,// "stopAtEnd" - If true & the slideshow is active, the slideshow will stop on the last page. This also stops the rewind effect when infiniteSlides is false.rtl : false,// If true, the slideshow will move right-to-leftstartText : "Start",// Start button textstopText : "Stop",// Stop button textdelay : 3000,// How long between slideshow transitions in AutoPlay mode (in milliseconds)resume : 15000,// "resumeDelay" - Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).time : 600,// "animationTime" - How long the slideshow transition takes (in milliseconds)easing : "swing"// Anything other than "linear" or "swing" requires the easing plugin},// Callbacks - removed from options to reduce size - they still work// *********** Callbacks ***********callbacks : {startup : function(e,slider){},// "onBeforeInitialize" - Callback before the plugin initializesinit : function(e,slider){},// "onInitialized" - Callback when the plugin finished initializingstart : function(e,slider){},// "onShowStart" - Callback on slideshow startstop : function(e,slider){},// "onShowStop" - Callback after slideshow stopspause : function(e,slider){},// "onShowPause" - Callback when slideshow pausesunpause : function(e,slider){},// "onShowUnpause" - Callback when slideshow unpauses - may not trigger properly if user clicks on any controlschange : function(e,slider){},// "onSlideInit" - Callback when slide initiates, before control animationslide : function(e,slider){},// "onSlideBegin" - Callback before slide animatescomplete: function(slider){}// "onSlideComplete" - Callback when slide completes - no event variable!},// Videovideo : {resume : true,// "resumeOnVideoEnd" - If true & the slideshow is active & a supported video is playing, it will pause the autoplay until the video is completeembedOptions : {wmode : "opaque"},// "addWmodeToObject" - If your slider has an embedded object, the script will automatically add a wmode parameter with this settingisPlaying : function(base){returnfalse;}// "isVideoPlaying" - return true if video is playing or false if not - used by video extension},// Miscmisc : {// InteractivityclickArrows : "click",// Event used to activate arrow functionality (e.g. "click" or "mouseenter")clickControls : "click focusin",// Events used to activate navigation control functionalityclickSlideshow : "click",// Event used to activate slideshow play/stop button// Misc optionsmaxOverallWidth : 32766// Max width (in pixels) of combined sliders (side-to-side); set to 32766 to prevent problems with Opera}});
$('#slider').anythingSlider({// Appearancewidth : null,// Override the default CSS widthheight : null,// Override the default CSS heightexpand : false,// If true, the entire slider will expand to fit the parent elementresize : true,// "resizeContents" - If true, solitary images/objects in the panel will expand to fit the viewportmultiple : false,// "showMultiple" - Set this value to a number and it will show that many slides at onceinfinite : true,// "infiniteSlides" - if false, the slider will not wrapstart : 1,// "startPanel" - This sets the initial paneltheme : 'default',// Theme name// Controls - combined navigation and slideshow controlscontrolsAppendTo : null,// "appendControlsTo" - A HTML element (jQuery Object, selector or HTMLNode) to which the controls will be appended if not nullcontrolsToggle : false,// "toggleControls" - if true, slide in controls (navigation + play/stop button) on hover and slide change, hide @ other times// NavigationnavBuild : true,// "buildNavigation" - If true, builds a list of anchor links to link to each panelnavEnable : true,// "enableNavigation" - if false, navigation links will still be visible, but not clickable.navFormat : null,// "navigationFormatter" - Details at the top of the file on this use (advanced use)navHash : true,// "hashTags" - Should navigation links change the hashtag in the URL?navTooltip : 'tooltip',// "tooltipClass" - Class added to navigation & start/stop button (text copied to title if it is hidden by a negative text indent)// ArrowsarrowsBuild : true,// "buildArrows" - If true, builds the forwards and backwards buttonsarrowsToggle : false,// "toggleArrows" - If true, side navigation arrows will slide out on hovering & hide @ other timesarrowsChange : 1,// "changeBy" - Amount to go forward or back when changing panels.arrowsForwardText : "»",// Link text used to move the slider forward (hidden by CSS, replaced with arrow image)arrowsBackText : "«",// Link text used to move the slider back (hidden by CSS, replace with arrow image)arrowsKeyboard : true,// "enableKeyboard" - if false, keyboard arrow keys will not work for the current panel.// Slideshow optionsshowBuild : true,// build it *new*showEnable : true,// "enablePlay" - if false, the play/stop button will still be visible, but not clickable.showStart : true,// "autoPlay" - **changed** now this functions like the "startStopped" optionshowLock : false,// "autoPlayLocked" - If true, user changing slides will not stop the slideshowshowPause : true,// "pauseOnHover" - If true & the slideshow is active, the slideshow will pause on hovershowStopAtEnd : false,// "stopAtEnd" - If true & the slideshow is active, the slideshow will stop on the last page. This also stops the rewind effect when infiniteSlides is false.showRtl : false,// If true, the slideshow will move right-to-leftshowStartText : "Start",// Start button textshowStopText : "Stop",// Stop button textshowDelay : 3000,// How long between slideshow transitions in AutoPlay mode (in milliseconds)showResume : 15000,// "resumeDelay" - Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).showTime : 600,// "animationTime" - How long the slideshow transition takes (in milliseconds)showEasing : "swing",// Anything other than "linear" or "swing" requires the easing plugin// *********** Callbacks ***********onStartup : function(e,slider){},// "onBeforeInitialize" - Callback before the plugin initializesonInit : function(e,slider){},// "onInitialized" - Callback when the plugin finished initializingonStart : function(e,slider){},// "onShowStart" - Callback on slideshow startonStop : function(e,slider){},// "onShowStop" - Callback after slideshow stopsonPause : function(e,slider){},// "onShowPause" - Callback when slideshow pausesonUnpause : function(e,slider){},// "onShowUnpause" - Callback when slideshow unpauses - may not trigger properly if user clicks on any controlsonChange : function(e,slider){},// "onSlideInit" - Callback when slide initiates, before control animationonSlide : function(e,slider){},// "onSlideBegin" - Callback before slide animatesonComplete : function(slider){},// "onSlideComplete" - Callback when slide completes - no event variable!// VideovideoResume : true,// "resumeOnVideoEnd" - If true & the slideshow is active & a supported video is playing, it will pause the autoplay until the video is completevideoOptions : {wmode : "opaque"},// "addWmodeToObject" - If your slider has an embedded object, the script will automatically add a wmode parameter with this settingvideoIsPlaying : function(base){returnfalse;}// "isVideoPlaying" - return true if video is playing or false if not - used by video extension// InteractivityclickArrows : "click",// Event used to activate arrow functionality (e.g. "click" or "mouseenter")clickControls : "click focusin",// Events used to activate navigation control functionalityclickSlideshow : "click",// Event used to activate slideshow play/stop button});
The first one has too much fuzz. The naming of the second one, esp. of the slideshow options, seems too unclear for me. I'd prefer the following:
//Appearance
buildArrows
buildNavigation
buildStartStopButton // +
appendArrowsTo // +
appendNavigationTo // split the AppendTo, so every Navigation-Element
appendStartStopButtonTo // can be handled separately
toggleArrows
toggleNavigation // same as AppendTo
toggleStartStopButton
...
texts, ...
//Behavior
autoPlay // combines autoPlay and StartStopped
pauseOnHover
stopAfterInteract
//times
initialDelay // + timeout before autoplay starts
delay
resumeDelay
animationTime
Does it make sense to omit width and height? Although it seems easy and practical, it compromises the division of "function" (in the js) and "visual appearance" (in the css).
You have some good points there... I've been working on it and I think I got it so the height and width is controlled by the css now. Now to test it and make a couple of other additions :)
Ok, I pushed a bunch of new updates in Version 1.7. See the Change Log in the main demo for a full list... I'm going to start updating the wiki now o.O LOL
Activity
Mottie commentedon Jul 1, 2011
I've thought about separating out this option... but I'd hate to add more options and have it be more confusing. Maybe I need a better way to organize the options.
Do you have any suggestions on maybe grouping options together? I've been thinking about doing something like what I have below, but I think there is a bigger chance of messing up with trailing commas and confusion, what do you think?
Mottie commentedon Jul 1, 2011
Hmmm, maybe this is better
chrissly commentedon Jul 4, 2011
The first one has too much fuzz. The naming of the second one, esp. of the slideshow options, seems too unclear for me. I'd prefer the following:
//Appearance buildArrows buildNavigation buildStartStopButton // + appendArrowsTo // + appendNavigationTo // split the AppendTo, so every Navigation-Element appendStartStopButtonTo // can be handled separately toggleArrows toggleNavigation // same as AppendTo toggleStartStopButton ... texts, ... //Behavior autoPlay // combines autoPlay and StartStopped pauseOnHover stopAfterInteract //times initialDelay // + timeout before autoplay starts delay resumeDelay animationTimeDoes it make sense to omit
widthandheight? Although it seems easy and practical, it compromises the division of "function" (in the js) and "visual appearance" (in the css).Mottie commentedon Jul 4, 2011
Hi Chrissly!
You have some good points there... I've been working on it and I think I got it so the height and width is controlled by the css now. Now to test it and make a couple of other additions :)
Mottie commentedon Jul 5, 2011
Hi Chrissly!
Ok, I pushed a bunch of new updates in Version 1.7. See the Change Log in the main demo for a full list... I'm going to start updating the wiki now o.O LOL