0 Replies - 9156 Views - Last Post: 02 January 2012 - 06:13 PM

#1 e_i_pi   User is offline

  • = -1
  • member icon

Reputation: 879
  • View blog
  • Posts: 1,893
  • Joined: 30-January 09

Overriding standard behaviour

Posted 02 January 2012 - 06:13 PM

I've seen in a lot of examples around the net, this method for overriding standard browser behaviour:
$('#mySurface').unbind('contextmenu').bind('contextmenu', function(e) {
  // Do my context menu here
  return false;  // This overrides the standard behaviour for the browser
});


Is this the best way to go about it? Returning false to suppress the browser context menu seems a little odd.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1