Q:

How to re-enable RightClick only for specific tag/id

I'm using this code:
document.oncontextmenu = (function() {
   var counter = 0;
   return function() { 
       counter++;
       if (counter == 3) {
           $("<div id='r-click'></div>").appendTo("#container").html("<span>!!! Protected content !!!</span>").fadeIn(500).show().delay(4000).fadeOut(800, function() {
           counter = 0;
       });
       }
       return false;
   };
})();

Now, my issue is that I have a textarea with the HTML code for a banner, and I need context menu appear only on it.
Is possible edit the code I'm using?

A:

Here the final working example:
var counter = 0;
document.oncontextmenu = function(e) { if (e.target.id != "txt") {
    counter++;
    if (counter == 3) { 
    $("<div id='r-click'></div>").appendTo("#container").html("<span>!!! Protected content !!!</span>").fadeIn(500).show().delay(2000).fadeOut(800, function() { 
    counter = 0 });
    }
    return false; };
};

https://jsfiddle.net/t579asv5/5/

