It is possible to simulate max-width:
simulateMaxWidth: function() { this.$el.find('th').css('width', ''); // clear all the width values for every header cell this.$el.find('th').each(function(ind, th) { var el = $(th); var maxWidth = el.attr('max-width'); if (maxWidth && el.width() > maxWidth) { el.css('width', maxWidth + 'px'); } }); }
this function can be called on $ (window) .on ('resize', ...) several times
this.$el
represents the parent element, in my case I have a puppet
for those elements that should have a maximum width, there should be a max-width attribute, for example:
<th max-width="120">
user2846569 Jun 28 '16 at 10:12 2016-06-28 10:12
source share