Jquery - where do the files go to?

Jquery - where do the files go to?

  
Hello all,
first of all i hope i am not over posting. I am spending a big amount of hours in this platform, and its quite addictive.
I have some experience in JQuery and i cant seem to find a specific way to make even the simplest JQuery work.

For what ive read one can add the .js as a resource. I tried to add it in the preparation action, wich seems to work since my source code displays the include corectly and the path file links to the correct .js script.
I tried to add the javascript to the javascript part of the webscreen in wich the javascript is suposed to work. I couldnt find a clear place to format the needed div class tags, so i just added them as well as the rest of the adjacent code needed to make the javascript run in an expression box.
Also...where do the css and other files go to? Should they be added as resources as well?

I guess my question is, what am i doing wrong and what am i doing right?

Thanks in advance
Hello Rui.

Don't forget that to inject jQuery in your screens you must set the Escape Content property to NO in your expressions.
Hello Rui,

You could also download the following components:

JQuery Gantt

Image Slider

These components are based on Jquery so you have a 'live' example how you should apply JQuery in OutSystems.

Hope this is usefull for you.

Kind regards,
Evert
Hi all,
João: Yes i know about it and i have it set that way, thx for the reply
Evert: Will definitly check it! Thx for the help


Rui
Hi Rui,

I'm used to use the Google API to include jQuery. Mostly I create a webblock with an script expression including the javascript file, eg.:

"<script src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>"

This webblock can easily be added to the top of the page. This works fine for me.

Kind regards,
Lennart
Hi Lennart,

Maybe also a suggestion, the JQuery javascript is also included in the osjs so sometimes you could also call that javascript so you don't need to include the JQuery javascript again.

The only disadvantage is that the platform is always a little bit behind :( (In version 6.0 the 1.4.2 is used).

Kind regards,
Evert