HTML5 Audio & Video for jQuery

a project by happyworm

Step 2 : Include jQuery

previous step | next step

jPlayer is a jQuery plugin, so you must include jQuery in your page before you add any plugins to the JavaScript library.

To use the jQuery CDN, add the following line to the HTML of your <head>:

<script type="text/javascript" src=""></script>

For the purpose of this guide, the code will use a jQuery url hosted on the same domain.

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

You will now have access to the entire jQuery Library on your webpage. If you are new to jQuery, you may want to look at the jQuery Documentation and review the comprehensive API you now have at your fingertips.

Take care to only include the jQuery library once in your page. If you are editting an existing complicated web page template, you might already have it!

previous step | next step


Some developers may decide to have their own copy of jQuery on their website. This avoids problems if the CDN was to fail, which leaves your site apprently working, but broken due to the CDN failure.

To use your own copy, download jQuery and upload it to your site. You'd upload it in a similar way to uploading jPlayer to your website. ie., Put it in an easy to use absolute address.