|
|
|
|
|
by simonw
6581 days ago
|
|
One big difference is that both Prototype and mooTools make modifications to the built-in types (extra Array methods etc). jQuery (and Dojo and YUI) explicitly avoids doing this for compatibility reasons. It's no coincidence that mooTools and Prototype are the only two big libraries that can't co-exist on a single page. The interesting thing about jQuery is its focus - it almost exclusively works to improve the interaction between JavaScript and HTML. DOM manipulation is more convenient in jQuery than any other library, and the other library features build on top of that core ideal. mooTools and Prototype attempt to make improvements to the JavaScript language. jQuery tends to play along with the language - it supports a functional style of programming using lots of closures (while you can avoid them if you really want to I find jQuery code with closures flows really well). |
|
$('div').draggable().create({Object hash}).draggableDestroy();
It may look awkward at first but I think it will a result into a new win in the long run. I'm having alot of trouble downloading the new library for some reason but can you do something like this?
$('div').draggable().create({Object hash},function(){ alert(Object Creation confirmed}; ).draggableDestroy();
I think the ability to launch a callback function on the creation of a object could open oppurtunities for better UI feel and responsiveness.