i got this error from countdown block
" $(...).countdown is not a function"
how to solve this
Hi @vishnu shankar ,
That kind error message usually not including the JQuery javascripts.
But I have check the plugin, JQuery is in the plugin in the countdown block.
Can you share your oml ?
Hi Vishnu,
When are you getting this error? Can you please elaborate?
Regards.
Jozy
I am not getting this error at very first time, Initially its working fine, but after some attempts it was throwing that error.
I enclosed the count down block in If widget, initially Boolean variable having false value, when i show timer i change Boolean value to true and refresh that if widget, and changing that value to false when i close.
I tried your scenario but i didn't get any error.
may be your jquery is not loaded properly.
Will including a jQuery script within the expression before that block resolve the issue?
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
you can give it a try, sorry but i am not sure about this.
Hi visnu,
Have you tried Jozy suggestion ?
For the root cause, my guess this is because the JQuery is inside the plugin (countdown block) and this is not rendered because inside if widget and the status still false. When you change the status, the javascript haven't run yet, but the function is already called.
Another suggestion from me, you move the JQuery of the countdown to another block, and load that block outside if widget.
Yes @Toto i tried that method, but that not worked,
and i created countdown jquery block and placed that outside the if widget
copied from
https://github.com/hilios/jQuery.countdown/blob/master/dist/jquery.countdown.js