You are mixing HTML (the <script> tag) and javascript (the rest) however using a dynamic scripting language like PHP this would be doable
ie jQuery.noConflict(); (function($) { <?php include 'include_my_jquery_code'; ?> })(jQuery); this is messy and I never like putting php tags in the middle of javascript if I can help it On Sep 21, 5:28 am, greg <i...@wildanimaltracks.com> wrote: > Would the following work? > > jQuery.noConflict(); > (function($) { > <script type="text/javascript" src="jQuerystuff.js"></script> > > })(jQuery); > > On Sep 21, 5:53 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote: > > > > > > > > > Clarifying Marc's post, after doing jQuery.noConflict(), the jQuery > > shop folks can continue to use $ for jQuery stuff if they shadow the > > global symbol with a local one. The most common way to do that is to > > use a function argument: > > > jQuery.noConflict(); > > (function($) { > > // Here, $ = jQuery because $ resolves to the argument, so > > $("div").css("color", "blue"); // Turns text in all divs blue > > > })(jQuery); > > > // Here, $ = Prototype because noConflict() was called, so > > $$("div").invoke('setStyle', {color: "green"}); // Turns text in all > > divs green > > > FWIW, > > -- > > T.J. Crowder > > Independent Software Engineer > > tj / crowder software / com > > www / crowder software / com > > > On Sep 21, 9:05 am, Marc <marc.heilig...@gmail.com> wrote: > > > > It's easy enough for the jQuery shop guys to use this pattern: > > > > (function($) { > > > // jQuery stuff here > > > > })(jQuery); > > > > -- Marc > > > > On Sep 20, 8:14 pm, kstubs <kst...@gmail.com> wrote: > > > > > I've read through the post, but need clarification on the no-conflict > > > > steps. > > > > I have written an API using prototype. I am now handing the code over > > > > to a > > > > jquery shop. They do not want to change their use of $ symbol for > > > > jquery. > > > > How can this be accomplished? > > > > > Thanks, > > > > Karl.. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.