Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Disable parent pages

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27406
    leehughes
    Member

    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

    #68869
    kobylecki
    Member

    on jQuery way:

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

    It just disable link, didn’t remove anything.

    #68870
    leehughes
    Member

    Ohh wow thanks..

    Where do I put this then? header or body?

    Many thanks :)

    #68871
    kobylecki
    Member

    I suggest in head section:

    Code:

    and of course you should import jQuery.

    #68872
    leehughes
    Member

    Thanks..

    What do you mean import jQuery?

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

    Thanks again :)

    #68875
    kobylecki
    Member
    Code:

    or if you don’t have jquery.js:

    Code:
    #68877
    leehughes
    Member

    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)
  • The forum ‘JavaScript’ is closed to new topics and replies.