raythedesigner
4/22/2020 - 6:08 PM

Add link to text

jQuery(function() {
    jQuery('.selector').each(function() {
        var src = jQuery(this).prop('/link');
        jQuery(this).wrap(jQuery('<a>').prop('href', src));
        // OR THIS -> jQuery(this).wrap(jQuery('<a>').prop({'href': src, 'target': '_blank'}));
    });
});

// OR

jQuery('.selector').wrapInner('<a href="/link"></a>');