jquery - Call Editable after modal loads -
i have bootstrap modal call:
<a href='/urltoloadcontentfrom' data-toggle="modal" data-target="#driverprofile">view driver information</a>
the page displays following url needs editable
<a href="#" class="editable" data-type="text" data-pk="1" data-url="/post" data-title="enter username" data-mode="inline">link here</a>
i need bind "editable". initialize editable
$('.editable').editable();
i tried initialize with:
$('#driverprofile').on('shown', function () { $('.editable').editable(); });
but seem fire before content displayed , not initialized.
any ideas?
"editable" library i'm using: http://vitalets.github.io/x-editable/
i ended doing following call when loading editable:
$('.modal-body').editable({selector: '.editable'});
this binds editable .modal-body , attaches item class of .editable inside modal-body regardless of when generated.
Comments
Post a Comment