Skip to content

Instantly share code, notes, and snippets.

@beatak
Created April 20, 2012 18:53
Show Gist options
  • Save beatak/2431011 to your computer and use it in GitHub Desktop.
Save beatak/2431011 to your computer and use it in GitHub Desktop.
Add shy well
var shyiezeRecur = function () {
var $div = $('#something');
var MAX_CHAR = 55;
$div.data('shyed');
var w = $div.width();
$div.find('*').each(
function () {
var $this = $(this);
if ($this.find('*').length === 0 && $this.width() > w) {
$this.shyize({limit: MAX_CHAR});
}
}
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment