소스 검색

Listing 4.3: increase font size.

Frederic G. MARAND 8 년 전
부모
커밋
1497340d0c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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');
   });
 });