Reputation: 1
I am trying to provide a character count of a text area after the modal box pops up and I am unable to get this to work no matter what Counter library I use. If I move the textarea outside of nyroModal the counter works as expected. After debugging a bit it appears that inside the jqEasyCounter library there is call to get the .val() of the textarea ('comment') in my example and that value always returns 0. I think i am just not using the callback correctly, or i need to pass on something additional.
$('.nyroModal').nyroModal({
callbacks: {
afterShowCont: function(nm) {
$('#comment').jqEasyCounter();
}
}
});
Upvotes: 0
Views: 166
Reputation: 780
u may have imported the jquery file more than once may be like
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
and then you may have also included like
<script type="text/javascript" src="js/jquery.min.js"></script>
so it will work when you remove the lower one ... dont remove upper one because nyromodal is working on that version ...
hope it will work ... let me know if there are any issues
Upvotes: 0