Forráskód Böngészése

Listing 3.21: event rebinding.

Frederic G. MARAND 9 éve
szülő
commit
097e1bc7f2
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      Chapter 3/03.js

+ 3 - 1
Chapter 3/03.js

@@ -22,6 +22,9 @@ $(document).ready(function () {
   $('#switcher-narrow, #switcher-large').click(function () {
     $('#switcher').off('click.collapse');
   });
+  $('#switcher-default').click(function () {
+    $('#switcher').on('click.collapse', toggleSwitcher);
+  });
 });
 
 $(document).ready(function () {
@@ -40,4 +43,3 @@ $(document).ready(function () {
     } 
   });
 });
-