minddust / bootstrap-progressbar

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

Need to update code to look for .data instead of .attr #11

Closed gtwilliams03 closed 10 years ago

gtwilliams03 commented 11 years ago

.attr has been deprecated with jQuery 1.9 and 2.0 - so I expected to be able to call .data("percentage", 50) - but I had to call .attr("data-percentage", 50) - which is not compliant with the latest versions of jQuery.

Right now, I am just making both calls to be safe:

    $("#editingProgressBar").find(".bar").data("percentage", percentage); // correct
    $("#editingProgressBar").find(".bar").attr("data-percentage", percentage); // deprecated
    $("#editingProgressBar").find(".bar").progressbar();
minddust commented 11 years ago

in the 0.6 release i switched back to data but the aria attribute still requires attr method.

i will leave this open for futher discussions.

minddust commented 10 years ago

i'm considering this as closed cause there are no data attributes any more.