Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="test" style="display: block; opacity: 0.89;"></div>
- $("#test").click(function(){ return false});
- $("#test").unbind();
- $("#test").removeAttr("onclick");
- //Suggestions which do not work
- $('#test').on('click', function(e) {e.preventDefault();return false;});
- $("#test").click(function(event){
- event.preventDefault();
- });
- $(function () {
- $("#test").click(function(){alert('test');});
- $("#test").off('click');
- });
- $("#test").click(function(){ return false});
- $("#test").unbind();
- $("#test").removeAttr("onclick");
- var $test = $("#test").removeAttr("onclick"),
- $contents = $test.contents().detach();
- $test.replaceWith($test.clone(false).append($contents));
- // To disable:
- $('#test').each(function (){
- this.style.pointerEvents = 'none';
- });
- // To re-enable:
- $('#test').each(function (){
- this.style.pointerEvents = 'auto';
- });
- $('#test').on('click', function(e) {e.preventDefault();return false;});
- $("#test").click(function(event) {
- event.preventDefault();
- });
- $('#test').unbind('click')
- $( "#test" ).bind( "click", handler );
- $( "#test" ).unbind( "click", handler );
- $( "#test" ).on("click", function () {
- });
- $("#test").off("click");
- $("#test").click(function(){
- $( "#test" ).unbind( "click");
- alert('Jquery/Javascript Event');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement