Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
Button loader using bootstrap

I am trying to replicate this codepen example

https://codepen.io/jmalatia/pen/eYLzBg?editors=1111

However, it doesn't work in my Visual Studio Code as in the site. I have included all the css and js files spicified there but I can't see anything else more than the button. I can't display the loader animation. Am I missing anything? I included these sources as indicated in the codepen example. I am not sure if I am missing any library, maybe.

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script> 
  
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  
  <script type="text/javascript" src="script.js"></script>

Maybe they are not in the right order. Please, I need some help figuring this out.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try running this script at the end of the Js links.

 <script>
  $('.btn').on('click', function() {
      var $this = $(this);
    $this.button('loading');
      setTimeout(function() {
         $this.button('reset');
     }, 8000);
  });
  </script>
about 4 years ago · Juan Pablo Isaza Report

0

$('.btn').on('click', function() {
    var $this = $(this);
  $this.button('loading');
    setTimeout(function() {
       $this.button('reset');
   }, 8000);
});
<html>
<head>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" />
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" />
  
</head>

<body>
  <div style="margin:3em;">
  <button type="button" class="btn btn-primary btn-lg " id="load1" data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing Order">Submit Order</button>
  <br>
  <br>
  <button type="button" class="btn btn-primary btn-lg" id="load2" data-loading-text="<i class='fa fa-spinner fa-spin '></i> Processing Order">Submit Order</button>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>

</html>

Did you link all the assets currently? I have checked the code it's worked perfectly on my side. right now I don't have your code to check where the problem is. make sure all CSS files are linked in a head tag. and script files are before the body stage is over. check browser console, if there is an error in the browser console please share a screenshot. thank you

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!