Forum


HomeHomePremiumPremiumDevelopmentDevelopment  commands commands
Previous
 
Next
New Post
3/24/2016 6:08 AM
 

Hi Aderson

Do you have any tips on using onload commands?  I need to create a menu that requires onload/javascript and I'm having trouble getting them to work.  I'm supposed to add them in the body tag.

 

Chris

 
New Post
3/24/2016 6:48 AM
 

Hi Chris,

Not 100% sure what you mean by "commands", but if I got your point correctly you need some javascript code to run after the page has loaded completely, is that correct?

If so, yes I know a way by using jQuery. See the code below:

<script type="text/javascript">
$(function() {

        [JAVASCRIPT CODE GOES HERE]

      });
</script>


Just replace [JAVASCRIPT CODE GOES HERE] with the javascript code you want to run and it will run once the page is fully loaded.

In terms of where you will place it within the page, I would just add this entire code snippet in the module header field of any HTML module settings on the page you want this to be on.

I hope this helps. If I got anything wrong, just let me know.

Cheers,

Aderson

 

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopment  commands commands



Try FREE
30 days money back guaranteed