rhythmofthecosmos
Member
Posted 2 years ago #
Hi,
I trying to figure out a way to put in # for a parent page in wordpress to stop them linking to anything. I have a drop down which works on hoover over which is what I want but currently a user can click the parent page which leads them to a blank page which I do not want.
For example.. http://www.leehughes.co.uk/route/#
I read that using # will cause the page not to link but how do I do this using wordpress?
thanks..
http://www.leehughes.co.uk
sweetevil28
Member
Posted 2 years ago #
Hello, I reviewed your disable link drop down post on wordpress and I see you've accomplished it. How did you do it?
jho1086
Member
Posted 2 years ago #
using this
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function () {
$j("li:has(ul)").hover(function () {
$j(this).children("a").click(function () {
return false;
});
});
});
</script>
jonnyplow
Member
Posted 2 years ago #
jho1086, in addition to yours, which works great, I added the following below to only disable the second parent in the menu. thanks for yours!
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function () {
$j("ul li ul li:has(ul)").hover(function () {
$j(this).children("a").click(function () {
return false;
});
});
});
</script>
jonnyplow
Member
Posted 2 years ago #
jonniboo
Member
Posted 2 years ago #
Hi,
Might be a daft question but where exactly does this script go?
jonniboo
Member
Posted 2 years ago #
guatemalandude
Member
Posted 2 years ago #
What if you just want it in one Page?
Thanks for this, I used it yesterday and it worked flawlessly. Make sure it's after the wp_head() call.