jquery script not working

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
lc4466
Propeller Head
Posts: 26
Joined: Tue Jun 18, 2019 10:20 am

jquery script not working

Post by lc4466 »

Hi all! I'm trying to use the following jquery script to create expanding tables in my html5 output: http://jsfiddle.net/w6tL8abc/

This is the first time I'm trying to use scripting in Flare - the html/script shown in the fiddle is exactly what I have in my project for testing purposes (minus the broken images which I replaced with local files), and I just added the script through the insert > script inside of the body of the test page directly (I also tried moving to the header but same result). But when I build the file it doesn't seem to be running the script on load. Anyone know what I'm doing wrong?

EDIT: Well, I just tried moving the script to the bottom of the page and that seems to do it! Leaving this here in case it helps any other newbies trying out scripting - put it at the bottom, not the top!!
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: jquery script not working

Post by NorthEast »

I put all my jQuery inside a $( document ).ready() container, as that will wait until the page is ready to run scripts. I put the scripts somewhere inside the body (not head).
See: https://learn.jquery.com/using-jquery-core/document-ready/
Post Reply