Bind to several event with bind() - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:bind

Description

Bind to several event with bind()

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.3.js"></script> 
      <script type="text/javascript">
    window.onload=function(){// w  w w  .  j  av a2  s  .c o  m
 $(window).bind('DOMMouseScroll keydown resize', function(ev) {
 console.log(ev.type)
  })
    }

      </script> 
   </head> 
   <body> 
      <div style="height:600px"> 
      </div>  
   </body>
</html>

Related Tutorials