Explorar o código

Listing 7.6: cookie's cyclePaused control.

Frederic G. MARAND %!s(int64=9) %!d(string=hai) anos
pai
achega
ee39ec5604
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Chapter 7/07.js

+ 3 - 0
Chapter 7/07.js

@@ -4,6 +4,9 @@ $(document).ready(function () {
     speed: 200,
     pause: true
   });
+  if ($.cookie('cyclePaused')) {
+    $books.cycle('pause');
+  }
   var $controls = $('<div id="books-controls"></div>').insertAfter($books);
   $('<button>Pause</button>').click(function (event) {
     event.preventDefault();