I am using small plugin to jquery:
jquery-plugin-autoresize
But i have trouble with using it with .live.
Does anyone know how to do it?
I tried
$('textarea .blog_comment').live('autoResize', function(e,{
// On resize:
onResize : function() {
$(this).css({opacity:0.8});
},
// After resize:
animateCallback : function() {
$(this).css({opacity:1});
},
// Quite slow animation:
animateDuration : 300,
// More extra space:
extraSpace : 40
}){});;
But it won’t work.
Please help. Thank you/
You either need to re-run the plugin after your elements are ready again, e.g. in the
successhandler of whichever AJAX method you’re using, like this:Or use a plugin like
.livequery(), like this:The short version is that
.live()doesn’t work for this…it’s event driven, so not really suited for running most plugins.