Vici A
Vici A

Reputation: 83

Jquery Cookie plugin doesn't load in wordpress

I've got a wordpress site with jquery cookie plugin installed. It used to work fine. For a little while, i've been working with a content that didn't require the plugin. Meanwhile, i've started using cloudflare.

Today, I tried adding content that utilizes that plugin, and suddenly got an error saying "Uncaught TypeError: $.cookie is not a function".

Obviously, the plugin is not loading. What i've done first is, i've moved that plugin from a separate file into header. Right above the script that utilizes it. No luck. I figured, it could still be showing cloudflare cached version, so, i've deleted cache and minified scripts & css. Still no luck. And now I'm stuck.

I know that people here like some code to be provided, but as you can understand, there is a lot of it.

Upvotes: 0

Views: 143

Answers (2)

Vici A
Vici A

Reputation: 83

Looks like disabling cloud flare took a while. Works fine now.

Upvotes: 0

the_seeker_who
the_seeker_who

Reputation: 9

Is it possible that $.cookie is being called before it is loaded? Or that CloudFlare force the loading of a jQuery asset whose version isn't compatible with your cookie plugin?

Upvotes: 0

Related Questions