Explorar el Código

Listing 4.2: read font size.

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

+ 3 - 1
Chapter 4/04.js

@@ -1,7 +1,9 @@
 $(document).ready(function () {
   "use strict";
 
+  var $speech = $('div.speech');
   $('#switcher-large').click(function () {
-    console.log('large');
+    var num = parseFloat($speech.css('fontSize'));
+    console.log(num);
   });
 });