suyash
suyash

Reputation: 1304

$.cookie is not a function error in Liferay DXP

I am using Liferay DXP version 7.0. Recently we migrated theme from 6.2 to 7.0 While doing so we copied our sources related to jquery apart from jquery js file.

We have noticed that there is out of the box jquery available in DXP. So I haven't included jquery in theme.

Rest of the jquery stuff works as is. However, the cookie part fails with

$.cookie is not a function

If i try to import same version of jquery i.e 2.1.4 provided by Liferay in plain html along with jquery.cookie.js it works fine but not with Liferay server.

Upvotes: 0

Views: 86

Answers (1)

Victor
Victor

Reputation: 3698

Seems like you are using a jquery plugin, you will need to include that, probably in your theme to be able to use it. You should not include jquery itself though, as it is available already. You will also have to make sure jquery is loaded first.

Upvotes: 0

Related Questions