ajax - Footable jQuery plugin missing icons after adding event listener -



ajax - Footable jQuery plugin missing icons after adding event listener -

i utilize jquery plugin 'footable' build responsive table. plugin adds icon every first column of every row, when row can expand , collapse. worked fine, untill added event listener checks button clicked within table.

my table set jquery after info loaded ajax. jquery looks this:

// table var table = $('<table/>', { class: 'footable table toggle-circle' }); // button, gets appended table cell removelink = $('<a/>', { 'class': 'row-delete', 'href': '#' }).text('remove');

the code above builds me nice table. after add together next event listener code (which works fine well), footable's icons no longer appear (expanding , collapsing still works):

// hear clicks $('#response').footable().on('click', '.row-delete', function(e) { /* stuff here. doesn't matter set here, */ when it's empty icons dismissed. }

the table mentioned loaded ajax call, on completion initializes footable plugin next code:

$(function () { $('.footable').footable(); });

not don't understand why icons missing, cannot understand why adding event listener messes plugins output begin with. miss?

the way footable set documentation web pages makes hard find , link relevant code, re-create (a modified) version here:

$('#response').on('click', '.row-delete', function(e) { e.preventdefault(); //get footable object var footable = $('.footable').data('footable'); //get row wanting delete var row = $(this).parents('tr:first'); //delete row footable.removerow(row); });

in case .footer dynamic adding listener #response wrapper.

jquery ajax eventlistener footable

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -