Skip to content

Instantly share code, notes, and snippets.

@carlosleonam
Last active July 11, 2023 17:48
Show Gist options
  • Save carlosleonam/b6a27fe23e480b6d18300590f3938036 to your computer and use it in GitHub Desktop.
Save carlosleonam/b6a27fe23e480b6d18300590f3938036 to your computer and use it in GitHub Desktop.
Disable \<a>\</a> Tag Anchor

Disable <a></a> Tag Anchor

$(document).ready(function() {
    $('a')
    .css('cursor', 'default')
    .css('text-decoration', 'none');

    $('a').on("click", function(e) {
        e.preventDefault();
    });
});

https://www.techiedelight.com/enable-disable-anchor-tag-with-javascript/

With Adianti Framework

$script_delay = 100; // Try set private static variable to use self::$script_delay
TScript::create("
    $('[class=\"tfile_link_wrapper\"] a')
        .css('cursor', 'default')
        .css('text-decoration', 'none')
        .on('click', function(e) {
            e.preventDefault();
    });
    $('[class=\"tfile_del_icon fa fa-minus-circle gray\"]').hide();
", true, $script_delay );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment