Support » Fixing WordPress » disable link for drop down

  • 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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello, I reviewed your disable link drop down post on wordpress and I see you’ve accomplished it. How did you do it?

    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

    (@jonnyplow)

    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

    (@jonnyplow)

    jonniboo

    (@jonniboo)

    Hi,
    Might be a daft question but where exactly does this script go?

    jonniboo

    (@jonniboo)

    Ah. In the header! derr!

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘disable link for drop down’ is closed to new replies.