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

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -