html - I want to block the click scrool whell on mouse -
i have code, it's inframe position, srcooling blocked if click scrool wheel can move down, , want block this:
<style type="text/css"> #outerdiv { width:550px; height:480px; overflow:hidden; position:relative; } #inneriframe { position:absolute; top:-412px; left:-170px; width:1280px; height:1000px; } </style> </head> <body> <div id='outerdiv'> <iframe src="http://minhateca.com.br/rubensgpl/filmes+avi/o+menino+do+pijama+listrado+dualaudio,20743425.avi" id='inneriframe' scrolling="no"></iframe> </div>
i found scripts block don't know put inside in html.
$(function() { $('body').mousedown(function(e){if(e.button==1)return false}); });
place javascript inside <head>
tag inside of <script>
tag follows. may work you:
.... </style> <script src="your/path/to/jquery.js"></script> <script> $(document).ready(function() { $("div").live('mousedown', function(e) { if( (e.which == 1) ) { e.preventdefault(); return false; } }); }); </script> </head>
this assuming of course have included jquery file
Comments
Post a Comment