New to jQuery and I want to create an external js file that when a button is click it shows an alert message.
This is what I have tried:
(function($){
events: function(){
$('#myModal').bind('click', function(e){
alert("test");
});
}
})(jQuery,window,document);
I get an error:
SyntaxError: function statement requires a name
What I'm I doing wrong and is this the correct way?