Javascript examples for jQuery Method and Property:bind
Bind using map
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").bind({ click:function(){$("p").slideToggle();}, mouseover:function(){$("body").css("background-color", "#E9E9E4");}, mouseout:function(){$("body").css("background-color", "#FFFFFF");} });/* w w w . j a v a 2 s.c o m*/ }); </script> </head> <body> <p>This is a paragraph.</p> <button>Click me!</button> </body> </html>