Skip to main content
Added some explanation.
Source Link
jb.
  • 24.1k
  • 18
  • 102
  • 138

You can use an anonymous function:

$(document).ready(function() {
  testing('hey world!'));
});

function testing(message){
    alert(message);
}
$(document).ready(function() {
  testing('hey world!'));
});

function testing(message){
    alert(message);
}

You can use an anonymous function:

$(document).ready(function() {
  testing('hey world!'));
});

function testing(message){
    alert(message);
}
Source Link
cyberwombat
  • 40.5k
  • 43
  • 188
  • 268

$(document).ready(function() {
  testing('hey world!'));
});

function testing(message){
    alert(message);
}