trunk8
trunk8 copied to clipboard
Uncaught Error: Invalid bite size "-16"
After trying to write my own code I decided to use trunk8. I cannot get it to fire for some reason, and I am not sure what the issue is. I made the title the console error it throws. Here is the implementation: $(document).ready(function(){ $('.ui-tabs-anchor').each(function(){ $('.ui-tabs-anchor').trunk8({ width: 30 }); }); }); and the page it should be working on: http://nmhc.dev.1over0.com/Content.aspx?id=8500#tabs-2
Thanks for your help! Chris
Could you reproduce the issue in a jsfiddle? Also, you don't need the each().
http://jsfiddle.net/jL2g4qox/2/
The problem here is that the width can be larger than the actual input, in case, for example, where the width is calculated by javascript or where the input is variable-width.
While it is possible to do the width calculation before asking trunk8 to work its magic (that's what we do currently) it would be nice, if trunk8 would be the one to decide if truncation is needed or not.
Tnx for Your time and trunk8
Confirmed. Could you submit a pull request?
The else if
block to handle fixed width truncation should have a check for negative bite_size and return early.