JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
1–10 of 16 posts
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#2Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#3I haven't had the chance to use jQuery, how does it compare to other JavaScript libraries such as MooTools or Prototype?
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#4I haven't had the chance to use jQuery, how does it compare to other JavaScript libraries such as MooTools or Prototype?
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#5# $(”div”).draggable(”destroy”) destroys it
Am I missing something here, or is that an extremely ugly design choice? Passing strings into functions to specify what function you want? eugh
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#6# $(”div”).draggable() creates a draggable # $(”div”).draggable(”destroy”) destroys it Am I missing something here, or is that an extremely ugly design choice? Passing strings into functions to specify what function you want? eugh
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#7I haven't had the chance to use jQuery, how does it compare to other JavaScript libraries such as MooTools or Prototype?
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#8# $(”div”).draggable() creates a draggable # $(”div”).draggable(”destroy”) destroys it Am I missing something here, or is that an extremely ugly design choice? Passing strings into functions to specify what function you want? eugh
jQuery('div:first').addClass('hello').text('Hello World').draggable().css('color', 'red');
If a plugin needs three or four methods, that's three or four extra functions on the one object - which ends up looking quite ugly:
jQuery('blah').draggable({options}).destroyDraggable()
The message passing idiom lets them add just one method to the jQuery.fn namespace that can cover a full range of different actions. I think it's a pretty clever pragmatic solution.
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#9I haven't had the chance to use jQuery, how does it compare to other JavaScript libraries such as MooTools or Prototype?
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).
Re: JQuery » jQuery UI v1.5 Released, Focus on Consistent API and Effects
#10# $(”div”).draggable() creates a draggable # $(”div”).draggable(”destroy”) destroys it Am I missing something here, or is that an extremely ugly design choice? Passing strings into functions to specify what function you want? eugh