Integrate with JQuery 

Integrate with JQuery 

Hello Service Studio Gurus 

Recently started Service Studio but came from ASP.NET Web Form/MVC way

I like how Web Form/MVC allows us to write our own HTML and we can integrate JQuery and defind it at the header

because outsystems create tables cells' ID dynamically (changing its value) I can only use class selectors, but as you guys know already javascript doesn't have getElementByClass, thus if there is jquery i can use $('.ClassName').Hide() etc.. 

So my question is how can I add Jquery library to the project thanks 
David -

The jQuery library is already added. In version 7 and lower, it is version 1.4 (I beleive) and aliased to "osjs" (so if something else adds a higher version as "$" they do not interfere). Version 8 uses "$" and the very latest version of jQuery.

I've found that in version 7, the jQuery 1.4 aliased to "osjs" meets 99% of my needs just fine, though one of my biggest reasons to move to 8 is the upgraded, more seamless jQuery use.

If you absolutely must have a newer version of jQuery aliased to "$", you have a few choices:

* The "AddLink" Action should allow you to refer to any of the common jQueries available on a CDN.
* You can insert an Expression with "Escape Content" set to "No" and use that to insert a script tag with the src attribute to point to jQuery.
* You can copy the jQuery JavaScript into the eSpace's JavaScript property and it will be added to the global JavaScript file that all pages in the eSpace link to.
* You can do the same on a page-by-page basis, or on individual Web Blocks, to make sure that it is ONLY done where needed to lighten the load.

Hi David,

Have you checked out the great forum post about how to integrate a jquery plugin in the OutSystems Platform? I think you should find a lot of very useful information there. 

Additionally, keep Justin's words in mind that with v8 of the OutSystems Platform jQuery 1.8.4 comes bundled in and you can just write your apps using "$".

Finally, from reading your post, let me ask - you do know that any widget you give a name to in Service Studio will then have an Id property. You can read more on the OutSystems Platform help entry to Widgets and HTML tags.

Wonderful responses. I'm glad that outsystems has a great community, I will give those solution a try