Hello! I was using this module to make my customized book menu look totally awesome with jQuery effect. I was able to use the API of the module, following the author's documentation here: http://pixelclever.com/official-documentation-jquery-menu-api.
I would say the that was a great documentation! However, I was having a hard time figuring out how to correctly implement the $trail argument.

Here I was able to create my menu http://screencast.com/t/DhO49VunQs,
displaying correct hierarchy and expanding the section when the parent book page is selected http://screencast.com/t/0e2MWDAl4mb
BUT closes the section when a child page is selected http://screencast.com/t/9JASEOJT

I also realized there are a lot of issue about this, but I could find my case, if not unique, unusual.

I tried to give the $trail the best match to $menutree array, as per instruction: http://screencast.com/t/h7RnGkDuNTNa. Here is the value of my $menutree:

Array
(
    [About This Manual] => Array
        (
            [link] => Array
                (
                    [title] => About This Manual
                    [href] => node/34
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 34
                )

        )

    [What is Niche Marketing] => Array
        (
            [link] => Array
                (
                    [title] => What is Niche Marketing
                    [href] => node/2
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 2
                )

            [below] => Array
                (
                    [3] => Array
                        (
                            [link] => Array
                                (
                                    [title] => In a Nutshell
                                    [href] => node/3
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 3
                                )

                        )

                    [5] => Array
                        (
                            [link] => Array
                                (
                                    [title] => The Three-Step Process
                                    [href] => node/5
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 5
                                )

                        )

                    [4] => Array
                        (
                            [link] => Array
                                (
                                    [title] => The Maths Behind the Profits
                                    [href] => node/4
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 4
                                )

                        )

                    [36] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Checkout Typography
                                    [href] => node/36
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 36
                                )

                        )

                )

        )

    [Planning your Strategy] => Array
        (
            [link] => Array
                (
                    [title] => Planning your Strategy
                    [href] => node/6
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 6
                )

            [below] => Array
                (
                    [11] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Your Business Model
                                    [href] => node/11
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 11
                                )

                        )

                    [12] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Market Research
                                    [href] => node/12
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 12
                                )

                        )

                    [13] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Your Domain Name
                                    [href] => node/13
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 13
                                )

                        )

                    [14] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Website Hosting and Implementation
                                    [href] => node/14
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 14
                                )

                        )

                )

        )

    [Building Your Site] => Array
        (
            [link] => Array
                (
                    [title] => Building Your Site
                    [href] => node/7
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 7
                )

            [below] => Array
                (
                    [15] => Array
                        (
                            [link] => Array
                                (
                                    [title] => The Site Structure
                                    [href] => node/15
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 15
                                )

                        )

                    [16] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Installing a Wordpress Site
                                    [href] => node/16
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 16
                                )

                        )

                    [17] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Basic Plug-ins
                                    [href] => node/17
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 17
                                )

                        )

                    [18] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Themes
                                    [href] => node/18
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 18
                                )

                        )

                    [19] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Essential Pages
                                    [href] => node/19
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 19
                                )

                        )

                    [20] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Adding Content
                                    [href] => node/20
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 20
                                )

                        )

                )

        )

    [Search Engine Optimisation] => Array
        (
            [link] => Array
                (
                    [title] => Search Engine Optimisation
                    [href] => node/8
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 8
                )

            [below] => Array
                (
                    [21] => Array
                        (
                            [link] => Array
                                (
                                    [title] => On-Site Search Engine Optimisation
                                    [href] => node/21
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 21
                                )

                        )

                    [22] => Array
                        (
                            [link] => Array
                                (
                                    [title] => On-Page Search Engine Optimisation
                                    [href] => node/22
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 22
                                )

                        )

                    [23] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Off-Site Search Engine Optimisation
                                    [href] => node/23
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 23
                                )

                        )

                )

        )

    [Marketing] => Array
        (
            [link] => Array
                (
                    [title] => Marketing
                    [href] => node/9
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 9
                )

            [below] => Array
                (
                    [24] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Article Marketing
                                    [href] => node/24
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 24
                                )

                        )

                    [25] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Backlinking
                                    [href] => node/25
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 25
                                )

                        )

                    [26] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Bookmarking
                                    [href] => node/26
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 26
                                )

                        )

                    [27] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Forums
                                    [href] => node/27
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 27
                                )

                        )

                    [28] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Social Marketing
                                    [href] => node/28
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 28
                                )

                        )

                )

        )

    [Maximise the Monetisation] => Array
        (
            [link] => Array
                (
                    [title] => Maximise the Monetisation
                    [href] => node/10
                    [has_children] => 1
                    [expanded] => 0
                    [options] => Array
                        (
                            [attributes] => Array
                                (
                                    [class] => book-parent
                                )

                        )

                    [nid] => 10
                )

            [below] => Array
                (
                    [29] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Customer Relationship Management (CRM)
                                    [href] => node/29
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 29
                                )

                        )

                    [30] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Google Adwords
                                    [href] => node/30
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 30
                                )

                        )

                    [31] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Clickbank
                                    [href] => node/31
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 31
                                )

                        )

                    [32] => Array
                        (
                            [link] => Array
                                (
                                    [title] => E-bay
                                    [href] => node/32
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 32
                                )

                        )

                    [33] => Array
                        (
                            [link] => Array
                                (
                                    [title] => Commission Junction
                                    [href] => node/33
                                    [has_children] => 1
                                    [expanded] => 0
                                    [options] => Array
                                        (
                                            [attributes] => Array
                                                (
                                                    [class] => book-child
                                                )

                                        )

                                    [nid] => 33
                                )

                        )

                )

        )

)

How should my $trail look like to make the "active trail" work? Can anyone help me? Thanks!

Comments

pat redmond’s picture

Status: Active » Closed (fixed)

Closing because it is so old. Re-open if it is still a problem with the latest version.