Answer the question
In order to leave comments, you need to log in
Why is attr not added when working with standard bootstrap button() function?
When you click on the "Update" button, the inscription changes to "Updating ..." then a request is sent and, if successful, the inscription changes to "Done!"
<button id="loading-example-btn" type="button"
data-loading-text="Обновляю..."
data-complete-text="Готово!">Обновить</button>
<script>
$('#loading-example-btn').click(function () {
var btn = $(this)
btn.button('loading')
$.post("/csrf/profile", function(data) {
if (data) {
// вот здесь attr не добавляется, почему не могу понят ((
// т.е. btn.button('complete') проходит нормально, а дальше нет
btn.button('complete').attr('disabled');
}
});
});
</script>
Answer the question
In order to leave comments, you need to log in
have you tried like this
:
Nothing has changed, right?
Right
eitherel.attr("disabled", true);
what if you try it like this?$('#loading-example-btn').prop('disabled', true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question