Can somebody please tell me why this isnt working?
$("textarea.settings").focus(function () {
var size = $(this).height();
console.log(size);
if(size == 40) {$(this).animate({height: 120},"slow");}
}, function () {
$(this).animate({height: 40},"slow");
});
please tell me why?
focus()doesn’t accept 2 parameters. Useblur()if your intention is for on/off focus: