minddust / bootstrap-progressbar

progressbar interactions for twitter bootstrap 2 & 3
www.minddust.com/project/bootstrap-progressbar
MIT License
577 stars 160 forks source link

Update options at runtime #49

Closed HaNdTriX closed 9 years ago

HaNdTriX commented 9 years ago

Right now options will not get updated. Example Code:

// - Everything works as espected
$('#myBar')
  .attr('data-transitiongoal', 10)
  .progress({
    done: function foo() {
      console.log('foo');
    }
  });

// - Later in time
$('#myBar')
  .attr('data-transitiongoal', 10)
  .progress({
    done: function bar() {
      // This function will never get called
      // Instead foo is used
      console.log('bar');
    }
  });

This pull-request will solve this issue.

minddust commented 9 years ago

@HaNdTriX nice! looks good to me. have to finish some work. will check this out tomorrow. note sure if this should be 0.8.6 or better 0.9.0 cause it might break some behavior on some peoples implementations.

HaNdTriX commented 9 years ago

0.9.0 might be the right way to go. :+1:

HaNdTriX commented 9 years ago

thx!