Skip to content
Browse files

Play button properly sets right class depending on autoplay setting

  • Loading branch information...
1 parent 19b015d commit aa8dd45df62e47d6cfba855202afafa0041b2656 unknown committed
Showing with 9 additions and 2 deletions.
  1. +9 −2 jquery.fadeAble.js
View
11 jquery.fadeAble.js
@@ -59,17 +59,24 @@
$(this).append(
'<div id="controls-container">'+
'<a class="button" id="'+options.prevId+'" href=\"javascript:void(0);\">'+options.prevText +'</a>'+
- '<a class="button pause" id="'+options.playId+'" href=\"javascript:void(0);\">'+options.playText +'</a>'+
+ '<a class="button" id="'+options.playId+'" href=\"javascript:void(0);\">'+options.playText +'</a>'+
'<a class="button" id="'+options.nextId+'" href=\"javascript:void(0);\">'+ options.nextText +'</a>'+
'</div>'
);
+ //Set the right class, If auto play is on set pause if it's not, set play
+ $('#'+options.playId).addClass((options.autoPlay)?'pause':'play');
$("#"+options.nextId).click(function(){ fade("next", container); });
$("#"+options.playId).click(function(){ toggle(container); });
$("#"+options.prevId).click(function(){ fade("prev", container); });
}
- if (options.loop && options.autoplay) {
+ $('#controls-container .button').css({
+ 'z-index':5
+
+ })
+
+ if (options.loop && options.autoPlay) {
options.timeoutToggle = true;
options.timeout = setTimeout(function(){
fade("next", container);

0 comments on commit aa8dd45

Please sign in to comment.
Something went wrong with that request. Please try again.