WordPress.org

Forums

[resolved] WP3 menus, create dummy non-click link (2 posts)

  1. Darrell Schauss
    Member
    Posted 4 years ago #

    I have some columns footer links I am using the top level links with some different styling as the title of that column. Most are actual pages, but one is not a real page so I put # as the href= for the link. Just for the sake of having a column name.

    What jQuery can I use to match a link within my footer div ID that has a # then remove its click. But if only #, #anchors I will leave as links.

    I suppose another way is to assign a class to that link and use jQuery on the class. But I am trying to reduce steps the client as to take to make a nonclick link.

  2. Darrell Schauss
    Member
    Posted 4 years ago #

    Using class. The class is assigned to the LI for the A

    $j('.noclick a').click(function(){
    	 return false;
    });

    Using just # as the link. I put only under class .menu so I don't remove any potential links that have # with other actions outside my menus.

    $j(".menu [href='#']").click(function(){
    	 return false;
    });

Topic Closed

This topic has been closed to new replies.

About this Topic