View Full Version : Remove URL's from headers
1) Script Title: Apple style Accordion Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-apple.htm
3) Describe problem: Hi,
I have been searching through the posts but cannot find a solution to this issue.
I am trying to remove the url link from each of the headers so that when you click on the header it does not redirect you. I am using the script as is - have tried removing the "clickgo" but has not helped.
If I remove the url from the code then it removes the border round the header??
Hope some help is out there,
Thanks in advance
Kev
jscheuer1
05-23-2011, 09:57 PM
So your headerclass is 'silverheader' then, right?
If so, you can put this script on the page:
<script type="text/javascript">
jQuery(function($){
$('.silverheader a').click(function(e){
e.preventDefault();
});
});
</script>
That should do it!
If not and/or you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
Thanks for the quick response but unfortunately John that did not work - it just expanded all the sections out.
Here is the link to the page:
http://sascomputing.yolasite.com/education.php
I can't think of any reason that simply removing the URLs from the anchor tags shouldn't work. I tried it with no adverse affects (http://www.custom-anything.com/sand/sascomputing.html) - in what browser does it cause problems for you?
I am using Google Chrome, just tried it in Firefox- same
so if I remove "<a href="http://www.dynamicdrive.com/style/" >"
from : </div>
<div class="silverheader"><a href="http://www.dynamicdrive.com/style/" >Craigslist, Kijiji & eBay</a></div>
<div class="submenu">
then the header border and color disappear??
jscheuer1
05-24-2011, 03:11 AM
Thanks for the quick response but unfortunately John that did not work - it just expanded all the sections out.
Here is the link to the page:
http://sascomputing.yolasite.com/education.php
Your current page has not followed the suggestion I outlined. Works here if I paste the command into the address bar. Are you sure you put the script on the page? If so, are you sure you weren't viewing a cached copy?
Also what traq was saying could work. Instead of removing the a tag, try just removing the href attribute.
right - look at the source code in the link I posted. don't remove the anchor ( <a> ) tag, just remove the URL ( the href="" attribute (That's what I thought you meant in your first post.) ).
Yes you are right, I did not know about leaving the anchor in. Works perfect now.
Thanks for spelling it out for me, you guys are Elite!!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.