39
Views
9
Comments
How to load jquery from my machine to OutSytems?
Question
I read other posts about how to integrate jquery in the application, but I did not understand how I do the following task:

I have jquery in the following path "C :/ js / jquery / jquery.js", how do I import this lib that is on my machine for the application?
2015-12-27 13-21-28
Luís Teixeira
hi,
it's like putting Javascript in the service studio.
2022-11-12 11-28-30
Gonçalo Martins
Staff
Hi,
You can see this step by step in this previous post:

https://www.outsystems.com/NetworkForums/ViewTopic.aspx?TopicId=7548&Topic=Integration-of-jQuery

Kind Regards,
Gonçalo Martins
UserImage.jpg
claudemir  ribeiro
Gonçalo Martins wrote:
Hi,
You can see this step by step in this previous post:

https://www.outsystems.com/NetworkForums/ViewTopic.aspx?TopicId=7548&Topic=Integration-of-jQuery

Kind Regards,
Gonçalo Martins
 
 Gonçalo, good morning

I read the post, but I did not understand how I load the library into the Outsystem, jWidgets directory is local?

JavaScriptURL  "/jWidgets/jquery-1.6.min.js"
2015-12-27 13-21-28
Luís Teixeira
OutSystems has jquery included in the platform.
just put jquery code in the javascript that works.

Note: change ($) to (osjs)
Example:

	osjs(document).ready(function(){
 
        osjs('.slidingDiv').hide();
        osjs('.show_hide').show();
 
    osjs('.show_hide').click(function(){
    osjs('.slidingDiv').slideToggle();
    }); 
});
UserImage.jpg
claudemir  ribeiro
Luís Teixeira wrote:
OutSystems has jquery included in the platform.
just put jquery code in the javascript that works.

Note: change ($) to (osjs)
Example:

			osjs(document).ready(function(){
 
        osjs('.slidingDiv').hide();
        osjs('.show_hide').show();
 
    osjs('.show_hide').click(function(){
    osjs('.slidingDiv').slideToggle();
    }); 
});
 I added this way and could shoot, but I had to get the element by class, for which the id is being generated dynamic.
 
That worked, thank you. 
2022-11-12 11-28-30
Gonçalo Martins
Staff
Hi,
You can do what Luís said but the platform version is not the last..Is a changed version of jQuery 1.4.2.
So, if you want to use a new one you can add the js file as a resource, which will be a folder hosted in your server:



Kind Regards,
Gonçalo Martins
UserImage.jpg
claudemir  ribeiro
Gonçalo Martins wrote:
Hi,
You can do what Luís said but the platform version is not the last..Is a changed version of jQuery 1.4.2.
So, if you want to use a new one you can add the js file as a resource, which will be a folder hosted in your server:



Kind Regards,
Gonçalo Martins
 
Thanks for the information,
I'll try this way also.
2022-11-12 11-28-30
Gonçalo Martins
Staff
claudemir ribeiro wrote:
 
Thanks for the information,
I'll try this way also.
 
Notice that I'm saying this way because you can have some plugins that are incompatible with the platform version.
However, if you want to use jQuery  not in a recent plugin, you can use the platform version to use all the general selectors and methods.
I use the platform version a lot..only for new plugins (and when I don't have time to check the differences between the versions) I add a new jQuery resource file.

Kind Regards,
Gonçalo Martins
2023-05-09 14-34-48
Hugo Catarino
Staff
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.