Interesting
someone has suggested it
$("#moon").click(myFunction("param"));
$("#earth").click(myFunction("param2"));
it involves less code, and it is probably faster because doesn't have condition statements that need to be executed.
Do you agree?
waseem sabjee ha scritto:
function re
}
});
use
$(document).ready(function(){
$("#moon").click(function() { myFunction("param"); });
$("#earth").click(function() { myFunction("param2"); });
});
function myFunction(param){
alert(param);
}
On Jun 13, 12:07 pm, Mirko Galassi wrote:
H
Hi guys,
apologize for posting again the same topic. I haven't found a solution yet
for my simple problem.
I have a simple function that works when a link is clicked
$(document).ready(function(){
$("#moon").click(function(){
alert("do something");
});
});
I need to reuse that functio
3 matches
Mail list logo