I would need to loop within some html elements, using the same code I get an error
jquery Uncaught TypeError: Object # has no method 'height'
What is wrong here?
clamp: function() {
var elms = $('#wrapper .content ul li .title');
elms.each(function(i) {
debugger
var elm = this;
var h = elm.height();
var eO = elm.outerHeight();
if (eO > h) {
elm.text(function(index, text) {
return text.replace(/\W*\s(\S)*$/, '...');
});
}
})