Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <div class="col-xs-12 col-sm-12 progress-container">
  2. <div class="progress progress-striped active">
  3. <!-- Part retrieved from the database -->
  4. <div class="progress-bar progress-bar-success" style="width:0%">60%</div>
  5. </div>
  6. </div>
  7.  
  8. console.log($(".progress-bar").text())
  9.  
  10. $( ".progress-bar" ).animate({
  11. width: $(this).text() //I want to get the value inside the progressbar div but doesn't seems like to work
  12. }, {
  13. duration: 2000,
  14. step: function( now, fx ) {
  15. }
  16. });
  17.  
  18. var $progressBar = $(".progress-bar")
  19. console.log($progressBar.text())
  20.  
  21. $progressBar.animate({
  22. width: $progressBar.text()
  23. }, {
  24. duration: 2000,
  25. step: function( now, fx ) {
  26. }
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement