Ladda-buttons
Ladda-buttons
joaogomes
Posts: 3Questions: 1Answers: 0
Hello all, first time here :)
I tried do implement ladda-buttons with buttons extension, with no success
in buttons action event this code: var l = Ladda.create(this); generates this error in element properties?
Have anyone yet implemented ladda-buttons?
How can I search in foruns questions?
thanks in advance
Joao
This discussion has been closed.
Answers
Hi,
I think you have problem with Ladda, not with buttons extension.
Are you using Ladda for Bootstrap 3 by msurguy?
Post more of your code, if you want real advice.
Hello Vitaliz and thank you for you reply :)
I have this script for testing purpose, on document ready:
$( ".ladda-button" ).click(function() {
//alert(this);
var la = Ladda.create(this);
la.start();
setTimeout(function(){ la.stop(); }, 3000);
});
It works fine for this testing button:
<a href="#" class="btn btn-primary ladda-button" data-style="zoom-out"><span class="ladda-label">Submit</span></a>
But could not make it work for the buttons extension, this is my code:
{
text: '<span class=\"fa fa-plus-square \"></span><span class="ladda-label"> Novo</span>',
action: function ( e, dt, node, config ) {
$('#formModal').load('tabelas/' + edt_frm + '?mode=insert&title=' + pgTitle, function (response, status, xhr) {
if (status == "success") {
$('#formModal').modal('show');
}
});
},
className: 'ladda-button insert'
},
I still could not add the atribute data-style="zoom-out", because I still didn't found out how to add atributes to the buttons extension, but still this button should came disable for 3 seconds, but that doesn't happen.
Thank you in advance and happy new year
João
Hi, João.
You post unformatted code and is difficult to read it,
I tried reformat it.
You write:
I tried reformat the last part of your code, but can't do it.
This is small part of code without context and I can't understand it.
I see, you use Ladda for form, but don't see how you bind Ladda to form's button.
Are you use this examples for Ladda?
http://msurguy.github.io/ladda-bootstrap/
Post more of your code and try format it with Markdown, please.
Link to Markdown description is under new comment form.
Regards,
Vitaliy.
The last part is the inicialization of buttons extension, it can be like this, (note: the code I now deleted is to show a form, on action):
buttons: [
{
text: '<span class=\"ladda-label\"><span class=\"fa fa-plus-square \"></span> Novo</span>',
className: 'ladda-button insert'
}
]
This button is on Bfrtip in the datatable, not in the form, it ust calls the form.
If you have this working can you give-me one example?
thank you Vitaliy
Hi, João.
I understand you now, thanks for your explanations.
I have no working example yet, because I only planned to add Ladda button to my datatable project in the next few days.
May be 31 dec I test this addition with my project.)
I can post my results here when they are ready.
Vitaliy