Browse Source

Listing 4.2: read font size.

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