DMXzone Bootstrap 3 Navigation Support Product Page

Answered

Default active menu not work. And menu are all actived after I click any one and refresh the page.

Asked 14 Jan 2015 16:02:55
1
has this question
14 Jan 2015 16:02:55 Ifan Hung posted:
Default active menu not work. And menu are all actived after I click any one and refresh the page. see demo site: www.ifantech.net/iii2015/testmenu.html

Replies

Replied 14 Jan 2015 16:05:12
14 Jan 2015 16:05:12 Teodor Kuduschiev replied:
Hello,
The active state of the menu is automatically being set, when the URL matches the HREF of the menu item. On your page this does not work, as all of the menus have "#" set for HREF.
Replied 15 Jan 2015 01:50:07
15 Jan 2015 01:50:07 Ifan Hung replied:
Hi,

If it being set automatically by the URL, when can I use the class "active". It doesn't active any tab.
eg. <li class="active"><a href="xxx.html">Home</a>[/*]

Is this class "active" abandon?

And if I use asp.net, I need to dynamic generate parameters with URL (eg. testmenu.aspx?a=1&...).
and I want to active the tab dynamic.
How do I do?
Replied 15 Jan 2015 09:47:57
15 Jan 2015 09:47:57 Teodor Kuduschiev replied:
The active class is being set by the jquery code, when the url matches the href of the menu item. If you add class active by hand, this will change nothing.
Replied 15 Jan 2015 10:02:26
15 Jan 2015 10:02:26 Ifan Hung replied:
Thanks for your hint. It's a javascript problem.
I remove "ScriptLibrary/dmxBootstrap3Navigation.js" that just make active tab to match the href.
Now I can use class="active" to active specific tab.

The code was generated by Bootstrap 3 Navigation. Now It finally works perfect.
<div class="nav-container">
<ul class="nav nav-pills">
<li class="active"><a href="#">Home</a>[/*]
  • <a href="testmenu.html">Profile</a>
  • <a href="#">Messages</a>
  • [/list]
    </div>
    Replied 15 Jan 2015 10:15:28
    15 Jan 2015 10:15:28 Teodor Kuduschiev replied:
    It is not a PROBLEM, that is how the extension is supposed to work. You should not remove the js code...

    Reply to this topic