| Author |
jQuery Equivalent of Prototype Function.bind
|
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
Is there a jQuery way of doing this Prototype bind?
Thanks.
|
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Use a closure
Eric
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
Remember that the purpose of Prototype is to make JavaScript as OO as possible, while jQuery uses JavaScript as itself. As such, Prototype defined .bind() to allow people to not have to really learn how JavaScript works (and thus avoid closures).
While that may have some appeal to some folks, I think it quickly becomes very limiting.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
Thanks Eric. closure is cool.
Thanks for the book Ajax In Action too. I have both editions. Any new version?
Thanks.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
Bruce Jin wrote:Thanks for the book Ajax In Action too. I have both editions. Any new version?
Ajax in Action only has a single edition. At one time, Manning planned for a 2nd edition, but there are no current plans for a second.
|
 |
Bruce Jin
Ranch Hand
Joined: Sep 20, 2001
Posts: 666
|
|
Thanks bear.
I messed up Ajax in Practice with Ajax in Action 2. Thanks for been the author!
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
No plans on Ajax In Action 2nd ed. we talked about it, but choose not too after long discussions.
I am working on two separate projects now. TOP SECRET.
Eric
|
 |
 |
|
|
subject: jQuery Equivalent of Prototype Function.bind
|
|
|