Can I get a couple of good examples on how to bind 3 separate functions I've got going on?
+3
A:
Create one function that calls all three and then bind to that function.
Or use an anonymous function:
$("#MyItemID").bind("click", function(){
func1();
func2();
func3();
});
You can also use the shorthand event. So (e.g.) for click:
$("#MyItemID").click(function(){
func1();
func2();
func3();
});
James Wiseman
2009-08-10 15:52:03
great answer James, thanks a mil bro!
Ronal
2009-08-10 20:28:03
+1
A:
You could also just chain them:
$("#MyItemID").click(func1).click(func2).click(func3);
happytime harry
2009-08-10 16:10:40