一个用户界面的概念,将合并到调用它们的行为中。主要用于实例中,它给用户提供即时反馈。
<button class="ladda-button ladda-button-demo btn btn-primary" data-style="zoom-in">Submit</button>
var l = $( '.ladda-button-demo' ).ladda(); l.click(function() // Start loading l.ladda( 'start' ); // Do something in backend and then stop ladda // setTimeout() is only for demo purpose setTimeout(function() l.ladda('stop'); },2000) });