How to add JavaScript

  • Knowledge Base
  • Mobile Website Builder
  • How to add JavaScript
  • Duda Support > Mobile Website Builder > Editing a Site

Overview

This article will show the different ways to add JavaScript to your mobile site. If your JavaScript isn't running when you navigate to the page try tuning off animated navigation, which can conflict with your JavaScript.

Please note that our support team cannot assist in troubleshooting custom code.

Head Section

Adding JavaScript to the head section of your site will add your script between the <head> and </head> tags on your mobile site. There are two ways to add JavaScript to the Head Section of your mobile site. You can add it into the Head Section of every page or add it to only the Head Section of a particular Page.

Every Page

In order to add JavaScript into the Head Section of every page on your mobile site, click on the gear at the top right -> Site Settings.

Next, click on the Advanced tab. There you'll see text box labeled Head Section. You can Place your JavaScript there, between <script> and </script>.

Particular Page

If you want to add a script for a particular page only, you'll click on the Pages tab at the left -> the page you want to add the script to -> SEO & Page Settings.

From there, click on Head Section and enter your script in the text box, between <script> and </script> tags.

Body

It is also possible to add JavaScript to the body of your mobile page. You can do this by using the HTML feature and dragging and dropping it onto the screen.

You can get more information about the HTML feature here. Again, be sure to enclose your script in <script> and </script>

×

Priority Phone Support

English phone support is available 18 hours a day,
Monday through Friday, 3am to 9pm (EST).

United States +1 866-776-1550 3am to 9pm (Eastern)
United Kingdom +44 (0)800-011-9071 8am to 2am (London)
France +33 (0)9-75-18-84-74 9am to 3am (Paris)
Israel +972 (0)3-720-8922 10am to 4am (Jerusalem)
Australia +61 (0)2-8880-9166 7pm to 1pm (Sydney)
To schedule a call in French, Portuguese, Hebrew or Russian, please email us at prioritysupport@duda.co
×

Please Log in as a DudaPro

Priority Phone Support is available exclusively to DudaPros. Log in to your DudaPro account now to see our international support numbers.

Log In
Not a DudaPro? Start a free trial now!