hey guys, why is this not working?
$("a.newslinks").each(function(){
if ($(this).text().length > 38) {
$(this).text().substr(35); //does not work
$(this).append('...'); //works
$(this).css({ "color" : "#ff00cc" }); //works
}
});
if a link has its text longer than 38 characters i wanna trim it to 35 chars and add … at the end!
what am i doin wrong?