5.3.js 250 B

12345678910
  1. $(document).ready(function() {
  2. // Use attr() to add an id, rel, and title.
  3. $('div.chapter a').attr({
  4. rel: 'external',
  5. title: 'Learn more at Wikipedia',
  6. id: function(index, oldValue) {
  7. return 'wikilink-' + index;
  8. }
  9. });
  10. });