Using Jquery to make text readonly but still clickable

Example Code:

jQuery(document).ready(function($) {    

//Make upload link readonly
if( $( '#uploads_link' ).length > 0 ) {
    $( '#uploads_link' ).attr( 'readonly', 'readonly' );
} 
});

I am trying to figure out how to keep the uploads_link URL path that the user see as readonly, but make it “clickable”. Right now the user is able to see the url link and copy and paste it, but now I’m trying to figure out how to make the readonly url clickable.

Any suggestions on how to make a attr( ‘readonly’, ‘readonly’) tag clickable?

Read more here: Using Jquery to make text readonly but still clickable

Leave a Reply

Your email address will not be published. Required fields are marked *