Explorar o código

Listing 5.2: setting multiple attributes at once.

Frederic G. MARAND %!s(int64=8) %!d(string=hai) anos
pai
achega
415d4f42c3
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Chapter 5/05.js

+ 4 - 1
Chapter 5/05.js

@@ -2,5 +2,8 @@
 $(document).ready(function () {
   'use strict';
 
-  $('div.chapter a').attr({rel: 'external'});
+  $('div.chapter a').attr({
+    rel: 'external',
+    title: 'Learn more at Wikipedia'
+  });
 });