AnsweredAssumed Answered

Should I use JQuery in the client-side javascripts?

Question asked by sunquanbin on May 27, 2014
Latest reply on May 27, 2014 by ddraper
Hi All,

I'm currently using JQuery in the client-side javascript files for the Share webscripts.The JQuery reference was added in the .ftl file of the webscript:

<@markup id="js">
   <#– JavaScript Dependencies –>   
   <@script src="${url.context}/res/jquery/jquery-1.10.2.min.js" group="myGroup"/>
   <@script src="${url.context}/res/jquery/jquery-ui-1.10.4.custom.min.js" group="myGroup"/>

It works fine so far but I'm also aware that Share was using YUI for its client-side javascript. So it will be grateful if anyone can help with my following questions:

1. Should I learn YUI and use it instead of JQuery in my own javascript?
2. If so, which version of YUI should I look at?
3. If not, it there a way to import JQuery as a global object so it doesn't need to import in every .ftl template file?