ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
939 stars 314 forks source link

Parent Item URL #2

Closed dashkevych closed 11 years ago

dashkevych commented 11 years ago

Hello, is it possible to add url to the parent item? example:

 <li><a href="URL">Parent 1</a>
        <ul>
            <li><a href="#">item 3</a></li>
            <li><a href="#">item 4</a></li>
        </ul>
    </li>

Thanks

ComputerWolf commented 11 years ago

SlickNav allows for this behavior. If you have a link that is also a parent, the actual text of the parent link is clickable as intended and to expand the branch you can click the "open" symbol or empty space within the row. However, to get the proper and less confusing functionality it is not advised to use actual links as parent items.

faidoc commented 11 years ago

I would like to have parents with links too and as I understand what you said, the default behaviour would be that if the user clicks on the label the link should work and if the user clicks on the symbol, the menu gets expanded. But I have the submenu expanded in both cases. Do I have to use some option to enable it?

ComputerWolf commented 11 years ago

Yes, you must set "allowParentLinks" to true within the options to allow clicking on parent links.

faidoc commented 11 years ago

Great thanks

guns65 commented 10 years ago

how can we add a javascript function to sliknav items ?? thx