Page 1 of 1

[solved] What is the preferred method to include JQuery?

Posted: Thu Jan 29, 2015 11:42 am
by stefhoesli
I am currently using

Code: Select all

<__script__ type="text/JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></__script> 
inside my CMSMS templates in order to use JQuery. But I am not sure if this is the preferred method?

I have seen that there is a cms_jquery tag, but I have not yet understood how this is supposed to work. I also read that the Gallery module has JQuery "built in". So can I have an "empty" Gallery command on my page and then use JQuery for something else?

What I actually want to achieve are dynamic filters and/or search fields in conjunction with the "Calguys User Directory" module, so that it is possible to search for and sort by different properties of the FEUsers. (Maybe JQuery would be an overkill for this, since there is a propvals action in the CGUserDirectory module that may be able to give me what I need. Does anybody know of an example implementation with the propvals action that I could check out?)

I will also have a look at this UDT: http://forum.cmsmadesimple.org/viewtopi ... =7&t=57118

Re: What is the preferred method to include JQuery?

Posted: Thu Jan 29, 2015 12:19 pm
by stefhoesli
The solution was right in front of my eyes:

There is a JQueryTools module:
http://dev.cmsmadesimple.org/projects/jquerytools

Re: [solved] What is the preferred method to include JQuery?

Posted: Thu Jan 29, 2015 12:52 pm
by Jo Morg
There is no preferred method of including JQuery, as it is much to each one's own preferred way of developing. However CMSMS does provide with it's own tag out of the box: {cms_jquery}...