javascriptjquerytypeerrorweebly

Uncaught TypeError: $ is not a function on weebly


I've done every things, but i get Uncaught TypeError: $ is not a function on my weebly site!

My Code:

setTimeout(function() {
$(".popup-wrap").on("click", function() {
    $(".popup-wrap .popup").hide();
    $(".next-popup").show("slow");
});
}, 4000);

HTML:

<div class="popup-wrap">
<div class="popup">
<b>Get your free</b> 999.9% <b>Gold Bullion</b> Cash Gold!
</div>

<div class="next-popup" style="display: none;">
Almost Done! Complete Free Affiliate Registration to receive Cashgold!
</div>
</div>

I'm unable to understand, why this happen, please help :)


Solution

  • Include jQuery in your project. That will solve your problem.

    Here is how you can do this.

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>