arielsalminen / TinyNav.js

Responsive navigation plugin that weighs just 443 bytes
http://tinynav.viljamis.com/
635 stars 207 forks source link

More efficient way of finding SELECTED item when active set #25

Open btopro opened 11 years ago

btopro commented 11 years ago
        var selected = '';
         if (parent_count < settings.depth_count) {
          selected = '';
          if ($(this).hasClass(settings.active)) {
            selected = 'SELECTED';
          }
           options +=
            '<option value="' + $(this).attr('href') + '"' + selected + '>' +
             indent + $(this).text() +
             '</option>';