Need help with jQuery UI Accordion navigationFilter option

Posted by theJBRU on Stack Overflow See other posts from Stack Overflow or by theJBRU
Published on 2010-02-19T14:25:44Z Indexed on 2010/04/23 23:23 UTC
Read the original article Hit count: 239

Filed under:
|

I'm building an accordion for navigation. Each section of the accordion has a set of links. The firing code looks like this:

$(document).ready(function() {
    $(".selector").accordion({
        collapsible: true,
        active: false,
        navigation: true
    });
});

This all worked fine and dandy until one of the links in each set was edited to point to a single file, call it foo.html. So now if you navigate to foo.html, the location.href matches every section of the accordion (since each section has a link to it) and that opens all the sections, defeating the purpose of the accordion.

So I'm pretty sure I need to use the navigationFilter option but I've googled the living hell out of it and haven't found any examples of how to build the function associated with it.

Help me, Stack Overflow!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui