avrei bisogno di ciclo all'interno di alcuni elementi HTML, utilizzando lo stesso codice ottengo un erroreUncaught TypeError: Object # <HTMLDivElement> non ha un metodo 'height' - Impossibile chiamare il metodo jquery sull'elemento
jquery Uncaught TypeError: Object # has no method 'height'
Cosa c'è di sbagliato qui?
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)*$/, '...');
});
}
})