diff --git a/index.html b/index.html index 10ce8cc..e31c96e 100755 --- a/index.html +++ b/index.html @@ -325,7 +325,7 @@ -
+

Venn Diagram

-
+

Passwords

    diff --git a/ktane.js b/ktane.js index e37c5bd..fa6dd8b 100755 --- a/ktane.js +++ b/ktane.js @@ -7,6 +7,7 @@ $('h2').on('dblclick', function () { $(this).closest('section').toggleClass('collapsed'); }).attr('title', 'Double-click to expand/collapse'); +/** Reset inputs */ ktane.resetInputs = function ($container) { $container.find('textarea').val(''); @@ -26,9 +27,15 @@ $('.jsResetSection').on('click', function () { ktane.resetInputs($(this).closest('section')).filter('[type="text"]').first().focus(); }); +/** Navigation */ $('section').each(function () { - var $navList = $('#navList'); - $navList.append('
  • ' + $(this).find('h2').first().text() + '
  • '); + var $section = $(this), + id = $section.attr('id'), + $a = $('' + $(this).find('h2').first().text() + '').on('click', function () { + $section.removeClass('collapsed'); + }); + + id && $('#navList').append($('
  • ').append($a)); }); (function () {