I am writing a code to hide/show the content on window scroll, Have added the javascript code under javascript widget on OnInitialize page.
$(document).ready(function(){ $('.xyz').hide(); $(window).scroll(function() { if ($(window).scrollTop() > 350) { $('.xyz ').show(); } else { $('.xyz ).hide(); }});});
Hello
have you added a dependencies of Jquery
If Not then you can take the dependencies from here and add it into a required script of a page or a block as per your requirenment
But Since it is deprecated try to achive your code with JavaScript only without library.
Hope this works
Thanks
You should not use jQuery on reactive. OutSystems loads already way to much scripts, loafing jQuery is not good for performance.
What needs to be done is easily doable with jQuery.
Yes thats why I told him try to achive this with JavaScript
Using Jquery on reactive web app is not a good practice. I would suggest to translate your jquery script into a vanilla javascript code. But if you really need to use Jquery you can check this documentation
https://success.outsystems.com/Documentation/How-to_Guides/Integrations/How_to_include_a_jQuery_plugin