You can use $ as normal in your own plugins. If you are writing JS
code that will be included globally (or even just on a plugin page you
didn't make) you should use the slightly longer jQuery form, though if
you wrap it in a function it isn't bad:
jQuery(function($) { $.dosomething; })
You can selectively activate jQuery's noconflict mode for a single
handler by setting a class variable jquery_noconflict=True. This is
only useful if you need to use a library that doesn't have its own no-
conflict mode and yet also uses the the $ variable.
--Noah
On Dec 2, 2008, at 2:24 AM, anatoly techtonik wrote:
>
> API changelog contains ambiguous notes about JQuery API change.
>
> Quoting:
> http://trac.edgewall.org/wiki/TracDev/ApiChanges#Milestone0.11
>
> # r6572: enabled the "noConflict" mode for jQuery, so that other
> Javascript libraries using '$' in a special way can be used. As a
> result, plugins using jQuery should be updated (follow the advice in
> http://trac.edgewall.org/changeset/6572#file11). Whether this change
> will stay or be reverted is under discussion. update: well, the change
> has actually been reverted without much discussion in r6715. "
>
>
> So, what is the proper way of using jQuery in Trac? From commit
> message of r6715 it is almost clear (well, if you are experienced
> enough to know what is that handler it mentions), but still ambiguous,
> because the change doesn't revert all the stuff committed in
> http://trac.edgewall.org/changeset/6572
>
>
> P.S. Should there be a more appropriate place with documentation on
> available JS API?
>
> --
> WBR,
> anatoly t.
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---