Forums

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

Home Forums JavaScript using jquery to remove hyperlinks from html

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28633
    straydesigns
    Member

    hi its a bit of an odd thing to do with jquery but i’ve been trying to use jquery to remove hyperlinks from links within a certain div.

    Code:


    Untitled Document


    What I’m trying to do is remove the link completly. When you look at the source when the page is running in a browser you can see the link clear as day. I was wondering whether theres a way that i could get rid of that also? Maybe jquery doesn’t even do this but any help would be great. thanks in advance.

    #73578
    Chris Coyier
    Keymaster
    #73665
    diablero13
    Member

    Try both:

    Code:
    $(‘#mydiv a’).each(function(){
    $(this).replaceWith($(this).text());
    });
    #77898
    kracey
    Member

    Frontpage 2003 edit hyperlink and to show text instead of image? I used to know how to do this but can’t remember! When you have a field that has maito: email address as the hyperlink and it’s represented with a jpg when you right click to edit hyperlink how do you make the email address display instead of image? thanks!
    ________________
    keyword research ~ keyword tool ~ keyword tracking ~ affiliate elite

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.