how do i call a method on a plugin once it's attached?
I use remy sharp's maxlength plugin, but i think this question is generic to any jquery plugin. how do i call a function on a specific control once i attach the plugin to it?
- <textarea name="x" id="y" maxlength="100"></textarea>
- Remaining: <span class='.limit'></span> (100 characters total)
- $('#y').maxlength({ 'feedback' : '.limit' });
the trouble is that later i set the textarea with jquery and the count doesn't update. i would like to call the updateCount() method in the maxlength plugin directly.
- $('#y').html('');