Search
 
SCRIPT & CODE EXAMPLE
 

HTML

add link to text using span html

<span>http://www.domain.com/about</span>
Comment

add link to text using span html

<a href="http://www.domain.com/about" target="_blank">http://www.domain.com/about</a>
Comment

add link to text using span html

<script type="text/javascript">

    $('.convertableIdentifier').each(function(i, el) {

        // grab the url and the link text
        var url = $(el).html();

        // create a new node with query by decorating a
        // empty a tag
        var newNode = $('<a></a>').attr('href', url).attr('target', '_blank').html(url);

        // replace the current node with our new node
        $(el).replaceWith(newNode);

    });

</script>
Comment

add link to text using span html

var href = jQuery('#linkChange').html();
var link = "<a href='"+href+"' target='_blank'>"+href+"</a>";

jQuery('#linkChange').replaceWith(link);
Comment

add link to text using span html

<span id="linkChange">http://domain.com</span>
Comment

add link to text using span html

<script type="text/javascript">
    $(document).ready(function(){
        $('td span').each(function(){
            $(this).html("<a href='" + $(this).html() + "' />" + 
                $(this).html() + "</a>");
        });
    });
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: How to Disable Auto Period Typing Shortcut on Mac 
Html :: convert markdown to styled html 
Html :: buttosn html 
Html :: html button multiple rows 
Html :: onclick open new page html 
Html :: how to send boolean with newselectList from cshtml in form C# 
Html :: gambar internal html 
Html :: canvas drawImage wrong size image 
Html :: contact us for blogger free html script 
Html :: html text not editable 
Html :: can we manipulate the html elements 
Html :: c# load embedded html document and show in browser 
Html :: html to pdf 
Html :: image code 
Html :: unsplash source 
Html :: website making sites 
Html :: input type file pattern attribute in html 
Html :: what does sma stand for 
Css :: css background image fit 
Css :: media query max and min width 
Css :: make text not selectable 
Css :: transition css hover 
Css :: html if text too long newline 
Css :: ion input padding left 
Css :: textview center text 
Css :: CSS make image fill whole background 
Css :: css text dots 
Css :: bootstrap col no gaps 
Css :: ion-slider pagination color 
Css :: list-style-image size 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =