views:

235

answers:

2

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
great answer James, thanks a mil bro!
Ronal
+1  A: 

You could also just chain them:

$("#MyItemID").click(func1).click(func2).click(func3);

happytime harry