jQuery / Twitter Bootstrap data-loading-text button with delay

后端 未结 7 1592
既然无缘
既然无缘 2021-01-30 12:49

I\'m trying to get this exact example working on my website:

http://getbootstrap.com/2.3.2/javascript.html#buttons

However, simply including this HTML:



        
相关标签:
7条回答
  • 2021-01-30 13:23

    just include the bootstrap library:

    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js "></script>
    

    This is an example:

    <!DOCTYPE html>
    <HTML>
    <HEAD>
        <TITLE>Bootstrap Example</TITLE>
        <link type="text/css" rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css ">
    <STYLE>
    </STYLE>
    </HEAD>
    <BODY>
        <button type="button" class="btn btn-primary" id="btnD" data-loading-text="=)">hola!!!</button>
    
    
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js "></script>
        <script type="text/javascript">
            $(function(){
                $('#btnD').click(function(){
                      var btn = $(this); 
                      btn.button('loading');
                });
            });
        </script>
    </BODY>
    </HTML>
    
    0 讨论(0)
提交回复
热议问题