Hier ist die Github Dokumentation: https://github.com/msurguy/ladda-bootstrapWie ladda-bootstrap button laden animation?
Ich versuche, meinen Code Arbeit zu machen, aber aus irgendeinem Grund wird die ladda nicht aufhören zu spinnen (Taste wird nie wieder aktiviert), auch wenn ich „Ladda.stopAll platzieren () nach dem AJAX-Anruf. Hier ist mein Code:
<button type="button" class="btn btn-lg btn-success ladda-button" data-style="expand-left" id="genPDF"><span class="ladda-label">Generate PDF</span></button>
<script>
Ladda.bind('button[id=genPDF]');
$('#genPDF').click(function() {
//Another approach I tried
//Ladda.bind(this);
var str = "tmName=" + $("#tmName").val() +
"&headingText=" + $("#headingText").val();
$.ajax({
url: "testing.php",
data: str,
cache: false,
success: function (data) {
//None of this code matters, it all works fine
console.log(data);
var container = document.getElementById("pdfContainer");
var content = container.innerHTML;
container.innerHTML = content;
}
});
//If I placed Ladda.stopAll(); here, the ladda wouldn't even
//START spinning upon being clicked on.
});
</script>
Ich bin gespannt, warum Sie 'Taste [ID = GenPDF]' anstelle von 'Taste # genPDF' verwendet haben – amflare
@amflare Ich ging voran und ersetzt durch" Schaltfläche # genpdf ". Aber das hilft mir immer noch nicht bei der Lösung des Problems. – NoReceipt4Panda