tag:blogger.com,1999:blog-8640596986273216089.post5537902863126111562..comments2023-08-15T06:10:51.086-03:00Comments on Ariel Flesler: jQuery.ModularizeAriel Fleslerhttp://www.blogger.com/profile/17700414222186772120noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8640596986273216089.post-39133348123125548032009-08-12T21:48:41.354-03:002009-08-12T21:48:41.354-03:00Check the subsection called "Basic call"...Check the subsection called "Basic call". It states that functions that act as namespaces will not be actually called when called with 0 arguments.Ariel Fleslerhttps://www.blogger.com/profile/17700414222186772120noreply@blogger.comtag:blogger.com,1999:blog-8640596986273216089.post-75076893443243874482009-08-12T18:07:57.774-03:002009-08-12T18:07:57.774-03:00Sample code:
$.fn.foo = function(){};
$.modulariz...Sample code:<br /><br />$.fn.foo = function(){};<br />$.modularize( 'foo' );<br />$.fn.foo.bar = function(){<br /> console.log('foo.bar fired: '+this.html() +' bar');<br />};<br />$.modularize('bar', null, $.fn.foo );<br />$.fn.foo.bar.foobar = function(){<br /> console.log('foo.bar.foobar fired: ' + this.html() + ' foobar');<br />}<br /> $('p').foo().bar(); // nothing happens<br />$('p').foo().bar(true); // log = foo.bar fired: Paragraph bar<br />$('p').foo().bar().foobar(); //log = foo.bar.foobar fired: Paragraph foobar<br /><br />Do u know $('p').foo().bar(); isn't getting called?<br />if I pass any argument it works fine.Rodrigohttps://www.blogger.com/profile/14352815855343177512noreply@blogger.comtag:blogger.com,1999:blog-8640596986273216089.post-79201788382934167892009-01-14T09:32:00.000-02:002009-01-14T09:32:00.000-02:00Very nice!!Note that if you do define $.fn.textUti...Very nice!!<BR/>Note that if you do define $.fn.textUtil, then you can call the plugin anytime you want, either before or after adding the methods.<BR/><BR/>Cheers, thanks for getting "into" the plugin :)Ariel Fleslerhttps://www.blogger.com/profile/17700414222186772120noreply@blogger.comtag:blogger.com,1999:blog-8640596986273216089.post-78698655207977788332009-01-14T06:40:00.000-02:002009-01-14T06:40:00.000-02:00Please check out my comparison of jQuery.Modulariz...Please check out my <A HREF="http://malnotna.wordpress.com/2009/01/14/jquerymodularize/" REL="nofollow">comparison of jQuery.Modularize</A> with other similar libraries.Anonymousnoreply@blogger.com