$(document).ready() to ensure jQuery and the DOM are loaded before executing custom code.Webflow.push() to run custom code after Webflow.js components like interactions are initialized.To access jQuery and Webflow.js scripts from custom embeds or external JavaScripts in Webflow, follow these steps to ensure these libraries are loaded and ready for use.
$(document).ready(function() { / Your code here / });
$(document).ready() to make sure that both jQuery and Webflow.js are ready and that the DOM is fully loaded.
Webflow.push(function() { / Your custom code / });
Using jQuery and Webflow.js in Webflow is straightforward since both are included by default. Ensure to use the document ready event for jQuery and the Webflow.push() method for Webflow.js functionalities to guarantee the libraries are fully loaded before your scripts run.