Created
April 20, 2012 18:53
-
-
Save beatak/2431011 to your computer and use it in GitHub Desktop.
Add shy well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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