I created a button that open a modal window on click.
<a href="#" data-toggle="modal" data-target="#myModal" class="signup-button gray-btn pl-pr-36" id="connectBtn" data-role="disabled">Connect</a>
For some reason the data-role="disabled"
doesn't work good.
How can I disable it?
You can use CSS to accomplish this:
.disabled {
pointer-events: none;
cursor: default;
}
<a href="somelink.html" class="disabled">Some link</a>
Or you can use JavaScript to prevent the default action like this:
$('.disabled').click(function(e){
e.preventDefault();
})