Explorar el Código

Listing 4.3: increase font size.

Frederic G. MARAND hace 8 años
padre
commit
1497340d0c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Chapter 4/04.js

+ 2 - 1
Chapter 4/04.js

@@ -4,6 +4,7 @@ $(document).ready(function () {
   var $speech = $('div.speech');
   $('#switcher-large').click(function () {
     var num = parseFloat($speech.css('fontSize'));
-    console.log(num);
+    num *= 1.4;
+    $speech.css('fontSize', num + 'px');
   });
 });