Browse Source

Listing 7.6: cookie's cyclePaused control.

Frederic G. MARAND 8 years ago
parent
commit
ee39ec5604
1 changed files with 3 additions and 0 deletions
  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();