1 Reply Latest reply on Apr 9, 2018 7:12 AM by itsallbroken

    Add custom JS script to HTML file


      I'm trying to add a "simple" photo slideshow to our homepage using CSS and jQuery, but am finding it extraordinarily difficult to:

      1) Get the jQuery to actually work without showing a "$ is not defined" error,

      2) Get the jQuery to actually run in the first place,

      3) Debug the jQuery using the Developer Tools in any browser


      Is it possible to add a jQuery function to an HTML file in the first place? And if so, how do I get it to run correctly?

        • Re: Add custom JS script to HTML file

          When you say HTML File, what do you mean exactly? Are you creating a custom theme map and modifing the SOY/FTL files or are you using an Overview page with the HTML widget or are you using Tiles?


          JQuery is build into Jive so you can call using $j rather than just $, tis may solve your problem, if your using widgets/tiles though then you need to make sure that jQuery is being called correctly.


          As for debugging, i use Chrome and its built in developer tools and that works perfectly for me.


          If the above doesn't help please clarify exactly what steps your are doing