AJ, What we do is add the following line in _serverSpecificVars.cfm (where lFiles points to the jQuery file I want to load for my site specifically). <skin:registerJs id="jquery" baseHref="#application.fapi.getWebRoot()#/js" lFiles="jquery-1.6.2.min.js" append="var $j = jQuery.noConflict(); var $ = jQuery.noConflict();" />
Then within our <head/> block (usually in displayHeaderStandard.cfm) we add the following: <skin:loadJs id="jquery" /> That should so it. The same goes for jQuery UI. If you want to make less calls for the end user and use lCombineIDs, then you'll have to conditionally check if the person is logged in. If they are, then you can't use jQuery and jQueryUI with lCombineIDs. This only affects loadJs with lCombineIds though, not loadCss. Example: <cfif application.security.isLoggedIn() is false> <skin:loadJs id="js-head" lCombineIDs="jquery,jquery-ui" /> <cfelse> <!--- Need to load the js for jquery and jqueryUI separately when logged in (otherwise it won't override FarCry's jQuery) ---> <skin:loadJs id="jquery" /> <skin:loadJs id="jquery-ui" /> </cfif> lCombineIDs is a great feature. In that example above, I'd add even more js files to it for better consolidation (I just kept the example limited to your question). I've been meaning to write a quick little tutorial about lCombineIDs (gotchas and how-tos), but never got around to it =\. Regards, -- Jeff Coughlin On Aug 16, 2011, at 10:52 PM, AJ Mercer wrote: > Does any one know how I can have a different (newer) version of jQuery for > the web site from the Farcry Webtop using skin:registerJS? > > I have tried giving ms site a differed ID (jquery-project) but Farcry still > loads it's version so there are two loaded and stuff breaks. > > In _serverSpecificrequestScope I have put in the following > > <cfif cgi.PATH_INFO NEQ "/webtop/index.cfm "> > <!--- only for web site ---> > <skin:registerJS id="jquery" > > baseHREF="/skin/jquery-ui-1.8.15" > > lFiles="jquery-1.6.2.js"><!--- jquery-1.5.1.js ---> > > <cfoutput> > var $j = > jQuery.noConflict(); > var $ = > jQuery.noConflict(); > </cfoutput> > </skin:registerJS> > </cfif> > > But the first one loaded gets cached and the other gets it. > > > I have jQuery plugins that use jQuery 1.6.2 > and that version has changed the way attr() works and added prop() to replace > it - for some situations (Attributes verses Properties) > -- > > AJ Mercer > <webonix:net strength="Industrial" /> | <webonix:org community="Open" /> > http://twitter.com/webonix > Railo Community Manager > > > -- > You received this message cos you are subscribed to "farcry-dev" Google group. > To post, email: [email protected] > To unsubscribe, email: [email protected] > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry
