Just FYI, my version doesn't use a link for the show-hide button, because I always refuse to put a link that links to nowhere. But instead, the <span> is also accessible through tab, and hitting the "enter" key also triggers the action.<br>
<br>See for example: <a href="http://es.pokemon.wikia.com/wiki/Plantilla:Kanto">http://es.pokemon.wikia.com/wiki/Plantilla:Kanto</a><br><br>My two cents.<br><br>-Jesús<br>-Ciencia Al Poder<br><br><div class="gmail_quote">
2009/6/15 Daniel Friesen <span dir="ltr">wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yup,<br>
Technically it's actually modified from my version (Some time ago I<br>
tweaked NavFrame to support span and fieldset as well as divs) but<br>
there's really no difference anymore because I'm finding NavFrames using<br>
$('.NavFrame') thus there is no distinction anymore (You can put a<br>
NavFrame on a table if you want, heh, though that's a little redundant).<br>
Also it's separate from the css.<br>
<br>
I'm debating whether or not I should smooth over functionality between<br>
the two. (ie: Make them both use [<a>show</a>], instead of one being<br>
[<a>show</a>] and the other <a>[show]</a>).<br>
<br>
If you want a list of remotely possible downsides.<br>
- I'm using a click event instead of a horrid javascript: href. So it<br>
only picks up on clicks on the show/hide button. If there is honestly<br>
anyone who would actually tab through all the links in the page just to<br>
get to the show/hide link (which I seriously doubt) I could be persuaded<br>
to try and find a way to capture other things to.<br>
- I shortened the code for show/hide itself to use jQuery's .toggle()<br>
and .is(':visible'); If for some freakish reason you've managed to make<br>
some rows/NavContent areas hidden and left others visible it will end up<br>
alternating instead of flat showing or hiding them all.<br>
<br>
Frankly I don't think either of those cases should be of any concern.<br>
If anyone wanted I could also substitute .toggle for .slideToggle to<br>
throw in some animation.<br>
<div class="im"><br>
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [<a href="http://daniel.friesen.name" target="_blank">http://daniel.friesen.name</a>]<br>
<br>
</div><div class="im">George Pribul (Kirkburn) wrote:<br>
> If I am reading correctly, this is an update for the JS shown on<br>
> <a href="http://www.wikia.com/wiki/Help:Dynamic_navigation" target="_blank">http://www.wikia.com/wiki/Help:Dynamic_navigation</a> ?<br>
><br>
> If it supports all the original functionality and is as good as you<br>
> make it sound, it sounds like it could be a great recommendation for<br>
> our users. :)<br>
><br>
> -------------------------------------<br>
> George Pribul (Kirkburn)<br>
> Associate Product Manager,<br>
> Wikia Inc.<br>
><br>
><br>
> 2009/6/15 Daniel Friesen<br>
> <<a href="mailto:lists@danielfriesen.name">lists@danielfriesen.name</a><br>
</div>> <mailto:<a href="mailto:lists@danielfriesen.name">lists@danielfriesen.name</a>>><br>
<div><div></div><div class="h5">><br>
> Just thought I'd let everyone know I rewrote the ShowHide (Wikipedia's<br>
> collapsible tables and NavFrame code) to make use of jQuery which<br>
> Wikia<br>
> is now using.<br>
><br>
> The resulting code is around 100 lines shorter than the WP code<br>
> (basically half the size), supports the "collapsed" class in BOTH<br>
> collapsible tables and NavFrame (The code being circulated around<br>
> Wikia<br>
> doesn't seam to support individual pre-collapsed NavFrames), works<br>
> with<br>
> whatever elements you want it to (NavFrame can work on things<br>
> other than<br>
> just divs), and loads quickly unlike the original WP code (jQuery's<br>
> ready event is more reliable than MediaWiki's built in addOnloadHook<br>
> which sometimes can actually end up being called considerably late in<br>
> comparison; I tested using MW's onload and jQuery's onload on separate<br>
> types of show/hide and jQuery fired considerably earlier than the MW<br>
> code which fired quite late after the page was already loaded).<br>
><br>
> The code is available on the dev wiki and can be easily included into<br>
> any wiki using the short snippet:<br>
> |importScriptPage('ShowHide/code.js',<br>
> 'dev');|<br>
> <a href="http://dev." target="_blank">http://dev.</a>.<a href="http://wikia.com/wiki/ShowHide" target="_blank">wikia.com/wiki/ShowHide</a><br>
> <<a href="http://dev.wikia.com/wiki/ShowHide" target="_blank">http://dev.wikia.com/wiki/ShowHide</a>><br>
><br>
> --<br>
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire)<br>
> [<a href="http://daniel.friesen.name" target="_blank">http://daniel.friesen.name</a>]<br>
><br>
> _______________________________________________<br>
> Wikia Community Mailing List.<br>
><br>
> For information and subscriptions see<br>
> <a href="http://lists.wikia.com/mailman/listinfo/wikia-l" target="_blank">http://lists.wikia.com/mailman/listinfo/wikia-l</a><br>
><br>
> Need staff help? Try <a href="http://www.wikia.com/wiki/Special:Contact" target="_blank">http://www.wikia.com/wiki/Special:Contact</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Wikia Community Mailing List.<br>
<br>
For information and subscriptions see<br>
<a href="http://lists.wikia.com/mailman/listinfo/wikia-l" target="_blank">http://lists.wikia.com/mailman/listinfo/wikia-l</a><br>
<br>
Need staff help? Try <a href="http://www.wikia.com/wiki/Special:Contact" target="_blank">http://www.wikia.com/wiki/Special:Contact</a><br>
</div></div></blockquote></div><br>