
// Create a new instance of ladda for the specified button var l = Ladda.create( document.querySelector( '.my-button' ) ); // Start loading l.start(); // Will display a progress bar for 50% of the button width l.setProgress( 0.5 ); // Stop loading l.stop(); // Toggle between loading/not loading states l.toggle(); // Check the current state l.isLoading();