jquery-2.1.1.min.js Openwrt Luci

1.8k Views Asked by At

I trying to make my on module for openwrt. I make simple pages for luci and now need for jQuery. So I add

<script type="text/javascript" src="/resources/jquery-2.1.1.min.js"></script>

to my htm file. But browser returns a 404 for jquery-2.1.1.min.js.

How to add jquery-2.1.1.min.js in luci?

1

There are 1 best solutions below

0
On

SSH into your router and issue following commands to download jquery-2.1.1.min.js at an appropriate location in the web directory of your device.

$ cd /www/luci-static/resources
$ wget http://code.jquery.com/jquery-2.1.1.min.js

Include the downloaded JQuery source in your HTML file as follows:

<script type="text/javascript" src="/luci-static/resources/jquery-2.1.1.min.js"></script>

That should do the trick!