HelloWorld
HelloWorld

Reputation: 21

Adding jQuery plugins in Liferay

I'm using Liferay 5.0. It includes the jQuery by default. The problem is that I want to add some jQuery plugins.

The questions are :

Where should I put them ? in the Javascript folder? Then how should I call them? Is there a clean way to do the whole operation?

I tried to include them in the "javascript" folder then calling them in the "portal_normal.vm" but it doesn't work.

Thank you,

Regards.

Upvotes: 2

Views: 672

Answers (1)

David
David

Reputation: 4285

place all javascript in the js folder

you can include js in your portal_normal.vm by placing this between your headtags

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
    <script type="text/javascript" src="$javascript_folder/jquery.dropdown.js"></script>

Upvotes: 2

Related Questions