Bootstrap按钮插件方法
作者:xuhongji发布时间:2020-08-07分类:bootstrap浏览:357评论:0
导读:<h2>Click on each of the buttons to see the&...
<h2>Click on each of the buttons to see the effects of methods</h2><h4>Example to demonstrate .button('toggle') method</h4><div id = "myButtons1" class = "bs-example"> <button type = "button" class = "btn btn-primary">Primary</button></div><h4>Example to demonstrate .button('loading') method</h4><div id = "myButtons2" class = "bs-example"> <button type = "button" class = "btn btn-primary" data-loading-text = "Loading..."> Primary </button></div><h4>Example to demonstrate .button('reset') method</h4><div id = "myButtons3" class = "bs-example"> <button type = "button" class = "btn btn-primary" data-loading-text = "Loading..."> Primary </button></div><h4>Example to demonstrate .button(string) method</h4><button type = "button" class = "btn btn-primary" id = "myButton4" data-complete-text = "Loading finished"> Click Me</button><script type = "text/javascript"> $(function () { $("#myButtons1 .btn").click(function(){ $(this).button('toggle'); }); }); $(function() { $("#myButtons2 .btn").click(function(){ $(this).button('loading').delay(1000).queue(function() { }); }); }); $(function() { $("#myButtons3 .btn").click(function(){ $(this).button('loading').delay(1000).queue(function() { $(this).button('reset'); }); }); }); $(function() { $("#myButton4").click(function(){ $(this).button('loading').delay(1000).queue(function() { $(this).button('complete'); }); }); }); </script>
相关推荐
你 发表评论:
欢迎- bootstrap排行
- 标签列表
- 网站分类
- 最近发表