javascript - DataTables & X-Editable making out of focus items editable -


i have working setup data-tables , x-editable allows user edit data inline in table gets loaded database. once page loads code below fires , makes editable options editable, except seems work first page of results. when click next, change number of results or search, items not on first page don't made editable. assuming because data-tables hides data not on current page removing document flow. how can make sure data in table editable?

$(document).ready(function () {     $.fn.editable.defaults.mode = 'inline';     $('.locatorid').editable();     $('.title').editable();     $('.latitude').editable();     $('.longitude').editable();     $('.website').editable();     $('.address').editable();     $('.city').editable();     $('.state').editable();     $('.zip').editable();     $('.country').editable();     $('.phone').editable(); }); 

first, move x-editable setup own function:

function setupxedit() {     $.fn.editable.defaults.mode = 'inline';     $('.locatorid').editable();     $('.title').editable();     ... } 

then set call function on every draw:

$('#example').datatable({     "fndrawcallback": function( osettings ) {      setupxedit();      } }); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -