javascript - formatCurrency not working after AJAX call -
i using format currency jquery plugin add together $
in front end of numbers. have table uses ajax phone call sort table. when page loads initially, $
added correctly. but, when sort table, function not called , numbers lose $
. there $(window).load
ajax call?
i should mention table sorting done through plugin, not want edit plugin's files. add together main.js
file in case plugin gets update.
here have far not working ajax call:
(function($){ $(window).load(function(){ $('.currency, .amount-applied').formatcurrency({ roundtodecimalplace: 0 }); }); })(jquery);
the ajax phone call sorts table should have callback function defined. if so, that's want set formatcurrency() call. $(window).load() doesn't fire after ajax call.
what plugin using sort table? if point in right direction can sorted (haha, see did there?)
javascript jquery ajax
No comments:
Post a Comment