Adding custom javascript to your Elementor-based site is a great way to add extra functionality and customization.
Whether you’re looking to add a custom slider or carousel, or just want to tweak the look and feel of your site, adding custom javascript can help take your site to the next level.
With a few simple steps, you can easily add custom javascript to any element on your site. This can be a great way to improve the user experience on your site or to simply make it more unique.
If you’re not sure how to get started, be sure to check out our blog on adding custom javascript to Elementor.With a little bit of research and experimentation, We offer some possible solutions that work for you.
Method 1: Add Scripts with a Plugin
There are a lot of plugins that allow you to use Elementor to add JavaScript to the page. Essential Addons, Ultimate Addons, and PowerPack are the best of Elementor to add JavaScript to the page.
Here we use the Essential Addons plugin for Elementor to add JavaScript to the page.
First, we have to install and activate the Essential Addons plugin. After activating it we will get the Essential dashboard.
Second, from there, navigate to the Extensions dashboard. On the Essential dashboard, click on the Extensions tab.
Third, if the Custom JS option is not already active, you should switch it on now.

Fourth, now edit the page you want to change using Elementor to add JavaScript to the page, and in the bottom left corner, click on the icon that looks like a cogwheel to enter the page settings.




Fifth, then, click on the tab labeled “Advanced.”
Now, you can add the scripts to the new Custom JS window.




Don’t forget to save the update button.
Method 2: Add JavaScript with the HTML Widget
You can add JavaScript by using elementor own HTML Widget. To do it, follow my steps:
First, navigate to the page where you want to add JavaScript and click on Edit with Elementor.
Second, Then, on the Elementor tab, search the “ HTML” widget to your desired section.
Third, drop and drag the “ HTML” widget to your desired section.




fourth, copy and paste the JavaScript inside the widget editor and click update.




Remember it, <script> tags when you use a JavaScript function.
What is Custom JS ?
JavaScript is a powerful scripting language that enables you to create dynamic, updated content, control multimedia, animate images, and much more.
JavaScript is the engine that adds interactivity to your web pages and applications. When used in conjunction with HTML and CSS, JavaScript can create amazing user experiences that would otherwise be impossible.
What are the Benefits of Add Custom JS ?
With Custom CSS/JS, you can make your website look and function exactly how you want it to. There are no limits to what you can do with Custom JS.
You can use it to modify any content on your website, add features from other domains, or implement self-made codes. The possibilities are endless! With Custom JS, you have complete control over the look and feel of your website. You can change the colors, fonts, layouts, and more. You can also add features that are not available in other themes. You can add a custom code that allows you to display a rotating banner on your website.
For example, if you want to add a social media feed to your site, you can find a plugin or piece of code that does this and then add it to your site using Custom JS.
Another great thing about Custom CSS or JS is that you can use it to implement self-made codes. This means that if you know how to code in HTML, CSS, and JavaScript, you can create your own customizations and then add them to your site using Custom CSS/JS.
This gives you complete control over the look and feel of your site. The possibilities with Custom CSS/JS are truly limitless.
What’s the Impact of JS Execution Time on Performance?
If you try to interact with a page and there is no response, it means that the JavaScript on the page is taking too long to execute.
When JavaScript code is executed, it has to execute on the main thread. That thread is also responsible for handling user input, so if your JavaScript code is taking a long time to execute, it can make the page seem unresponsive.
There are several factors that can affect JavaScript execution time, including the size and complexity of the code, the number of resources that need to be loaded, and the platform/browser being used.
To ensure optimal performance, it is important to minimize the amount of code used, and reducing the number of external files that are loaded can help keep execution times down.
One way to reduce JavaScript execution time is to use smaller and simpler code blocks. This can be achieved by breaking up code into smaller functions that can be executed independently. Another way to reduce execution time is to load fewer resources. This can be accomplished by using caching plugins like WP Rocket, WP Meteor, and W3 Total Cache.
Conclusions
Now that you know how to add custom JavaScript to your Elementor website, it’s time to start working on your site’s design.
Remember to keep your code clean and well-organized so that you can easily find and edit it later.
However, it’s important to remember that you should only add code that you’re comfortable with, as adding too much code can make your site slower and more difficult to use. Whichever method you choose, make sure you test your code before publishing.
If you’re not sure where to start, we recommend checking out our list of the best Elementor plugins and extensions. Like Essential Addons plugin that can add code directly into your child theme’s functions.php file.
Thanks for reading and happy coding!