Closed tuomassalo closed 12 years ago
As an addtion to this pull req: $select.bind('change', function () { could be $select.change(function () {
and .attr('selected', 'selected'); could be written .attr('selected', true);
right?
Hmm..
I think you could change this as well: $nav.addClass('l_' + namespace_i); $(this).find('a').each(function () {
to:
$nav.addClass('l_' + namespace_i).find('a').each(function () {
Thanks for these @kristerkari & @naapuri . I'll look into these later when I have a bit more time, probably during the weekend.
About the size: I do think it's correct. At least closure reports 350 bytes minimized & gzipped, without the copyright stuff on top.
Implemented all these changes, the size dropped to 319 bytes : )
Some tweaks around the code for some (quite futile) byte optimization.
Also, for safety, use
text()
andval()
to set up the<option>
tags.BTW, I think the 350 bytes gzipped is a bit optimistic.