1

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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Nick
  • 9
  • 3

1 Answers1

1

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!

microMolvi
  • 636
  • 11
  • 30