Forums

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

Home Forums CSS [Closed] How to create nonclickable anchor tag? ??

  • This topic is empty.
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #142070
    TheDoc
    Member

    If you want a clickable element for JS, don’t use an anchor element if it’s not meant to go anywhere. Simply use a <span> and add cursor: pointer; in the CSS.

    HTML:

    <span></span>
    

    CSS:

    .something-meaningful {
        cursor: pointer;
    }
    

    JS:

    $('.something-meaningful').click( function () {
      // do something
    });
    
    #169602
    Vikas Kumar Digglia
    Participant

    Its very easy
    a{
    cursor-pointer:none;
    }

    #169607
    Paulie_D
    Member

    Except that property is not supported by all browsers.

    Oh… And not really relevant to the previous discussions.

Viewing 3 posts - 16 through 18 (of 18 total)
  • The topic ‘[Closed] How to create nonclickable anchor tag? ??’ is closed to new replies.