Grow your CSS skills. Land your dream job.

Disable parent pages

  • # January 2, 2010 at 4:07 pm

    Hi,

    I have a drop down menu in which only a few are needed for drop downs.. the others are just a single option such as sponsorship

    http://www.leehughes.co.uk

    But for the menu with the drop down options the user can click the parent page but there is nothing on that page as I don’t need that page..

    For example my mutimedia page is empty as well as any other menu with a drop down..

    Is there a way I can disable these pages? I remember using # on dreamweaver, this seemed to do the job but now am on wordpress..

    any thoughts?

    Thanks

    # January 2, 2010 at 4:31 pm

    on jQuery way:

    Code:
    $(‘#nav li:has(ul)’).children(‘a’).click(function(){ return false; });

    It just disable link, didn’t remove anything.

    # January 2, 2010 at 4:32 pm

    Ohh wow thanks..

    Where do I put this then? header or body?

    Many thanks :)

    # January 2, 2010 at 4:35 pm

    I suggest in head section:

    Code:

    and of course you should import jQuery.

    # January 2, 2010 at 4:44 pm

    Thanks..

    What do you mean import jQuery?

    I have the script, do I just attach it to a stylesheet or something ?

    Thanks again :)

    # January 2, 2010 at 4:48 pm
    Code:

    or if you don’t have jquery.js:

    Code:
    # January 2, 2010 at 5:00 pm

    many thanks..

    I have added both pieces of code to my header now but the problem is still there with the parent pages..

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".