I am trying to expand the navigation options in the context menu for certain elements (in particular, h1and tags h2). I want to prevent the default browser action when I right-click on these elements.
h1
h2
I found some nice information on this page .
However, I could not find how to disable the context menu for certain items. Does anyone know how to do this?
I am using a prototype as my javascript API.
This will prevent the context menu from appearing on a specific item.
$(it).observe("contextmenu", function(e){ e.stop(); });
, , H1/H2
$$('h1, h2').each(function(it){ $(it).observe("contextmenu", function(e){ e.stop(); }); })
, ( , , "" , ). , . , , , . . , , , , . , , , - .
Source: https://habr.com/ru/post/1699359/More articles:Is this binary date format visible? - datehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1699355/limit-file-access-to-specific-users-in-iis&usg=ALkJrhht6JXlpR0qiymAvfpLjLYO7vXS6AUse ruby ββpearls, apt-get, etc. through a proxy with NTLM authentication - authenticationJava 6 compared to C # 3.0 - javaJava XML: how to derive namespace of child elements? - javaDoes Application.ExecutablePath use different values ββdepending on the test runner? - c #How to copy a dialog resource from one project to another in Visual Studio 6.0 or Embedded VC ++ (eVC)? - visual-studioRetrieving an expression tree from an action - c #How to clean files that are decrypted at runtime are cleared? - c ++Using RSpec for iPhone Controllers - ruby ββ| fooobar.comAll Articles