[sf-perl] [javascript] JS toolkit for Perl applications

Randal L. Schwartz merlyn at stonehenge.com
Thu Jul 8 18:57:37 PDT 2010


>>>>> "Kevin" == Kevin Frost <biztos at mac.com> writes:

Kevin> One tip: if you're using jQuery *do* use the compatibility mode,
Kevin> in which your jQuery magic-chain-function is called $j and not
Kevin> just $ - that will save you tons of debugging headache and
Kevin> prevent non-jQuery JS developers from hating you.

Naah.  Just pass jQuery in as a parameter:

    (function ($) {
    ...
        use $ here as normal
    ...
    })(jQuery);

Works fine, and doesn't scare the people who don't use Prototype.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


More information about the SanFrancisco-pm mailing list