Forums / Developer / I do not understand why still jquery is incorperated in ez .i have done everything clear

I do not understand why still jquery is incorperated in ez .i have done everything clear

Author Message

Romeo Antony

Sunday 04 July 2010 3:33:56 am

in ezjscore.ini file

LoadFromCDN=enable

#PreferredLibrary=yui3
PreferredLibrary=jquery

LocalScripts[jquery]=jquery-1.3.2.min.js
LocalScripts[jquery]=jquery.js
LocalScripts[jquery]=jquery.pikachoose.js
LocalScripts[jquery]=jquery-1.4.2.min.js

also i put the files in javascript folder in ezjscore and declared in site access design .ini

also put {ezscript_require( array( 'ezjsc::jquery' ) )} in template file

I am getting error message as jquery is not defined.What is wrong with ez and jquery.

I tried to eliminate conflict btw jqery and ez by jQuery.noConflict();
jQuery(function() {

But still not ...

André R.

Sunday 04 July 2010 8:05:49 am

1. LocalScripts[] is a hash, and your setting the value for the 'jquery' key 4 times, so it's value ends up being the last one, namely jquery-1.4.2.min.js.

2. ezjscore is a js lib intergration, and your not supposed to have to change anything in it, especially when you miss understand what it is used for. Only reason you would want to edit settings in ezjscore.ini is if you want to add support for another library like Prototype/MooTools, or you wanted to use a newer version of jQuery / Yui and need to change the location of the script settings or if want to change from using CDN (ExternalScripts) to locale (LocaleScript).

So, every thing you need in your template is :

{ezscript_require( array( 'ezjsc::jquery', 'jquery.pikachoose.js' ) )}

"ezjsc::jquery" is a dynamic call that uses settings from ezjscore.ini to determin where to load jQuery from. And jquery.pikachoose.js is a script you have downloaded and placed in your javascript folder in your design. ( eg: "extension/<my-extension>/design/<my-design>/javascript/jquery.pikachoose.js" )

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Romeo Antony

Sunday 04 July 2010 11:36:05 am

Thanks Andre, I got you. Although it is tougn to follow you , I followed your instructions.Now I have done. Thanks a lot ..This forum is really valuable

Romeo