Nixen85
Nixen85

Reputation: 1391

How to implement jQuery UI Touch Punch and Jquery-ui locally?

Accourding to this documentation (jQuery UI Touch Punch) I tried to install the following packages with npm in order to implement them locally in my project:

  1. jquery
  2. jquery-ui
  3. jquery UI Touch Punch

The first problem I had is, in the node_module folder of jquery-ui, jquery-ui.min.js is just not existing. Where can I find it?

The second problem is, when I use

<script type="application/javascript" src="assets/js/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>

in the head of my website, it`s not working, but

<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>

How could that be?

I hope someone can help me. It´s driving me crazy.

Upvotes: 2

Views: 2530

Answers (1)

Nixen85
Nixen85

Reputation: 1391

Finally, I found an answer:

Instead of using npm install jquery-ui, you need to use npm install jquery-ui-dist (see here) to get the missing jquery-ui.min.js and further essential files, which can then all be found under node_modules.

Subsequently, I implemented all three files from node_modules and it worked like a charme!

If someone has an answer to the second question, I still would appreciate it!

Upvotes: 2

Related Questions