PDA

View Full Version : Drill down menu idea



oldmanInAz
03-02-2012, 12:34 PM
http://www.dynamicdrive.com/dynamicindex1/drilldownmenu.htm


In using the drill down menu, I have come to find out I can not call a page when there are sub menus. In my case, I would like to have an information page show up when the user clicks on the item before going to the sub menu item.

www.1littleworld.net/sample

When you click on "AMC" I want to show an information page about the company. Is that possible to do? Or am I missing something?

ddadmin
03-02-2012, 09:36 PM
The default action associated with clicking on a category link is canceled by default by the script, to prevent the user from being whisked away to another page when the action should simply be to show additional menu items. With that said, in your case since you're substituting each URL within the menu with a JS call, this concern doesn't pertain to you, so the fix is simply to renable the default action.

To do this, first, you'll want to add a JS call within the AMC menu item like so:


<div id="drillmenu1" class="drillmenu">
<ul>
<li><a href="javascript:ajaxpage('AMC.html', 'rightcolumn');">AMC</a>
<ul>
<li><a href="javascript:ajaxpage('AMC-Rambler.html', 'rightcolumn');">Rambler</a></li>
<li><a href="javascript:ajaxpage('ajaxfiles/external2.htm', 'rightcolumn');">Ambassador</a></li>

</ul>
</li>
</ul>
</div>

Then inside the JS file, find and comment out the below line (addition in red):


$anchorlink.click(function(e){ //assign click behavior to anchor link
thisdrill.slidemenu(jQuery(this).data('control').order)
//e.preventDefault()
})

That should do it.

oldmanInAz
03-03-2012, 02:16 PM
Yes sir. That did the trick. Thanks.