O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — adding jQuery to our project

Because of the influx of people using jQuery, Google has set up a content delivery network that serves up the jQuery library for us without anything being required in our project. Let's tell our layout.php file where to find jQuery.

Open the layout.php file, and add the following code right before the end of the body section:

<script type="text/javascript" src= "//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
</body>
</html>

What just happened?

We just added one line of code before the end of our body tag in the layout.php file. That's all it took to use jQuery with our project! You may be wondering why we decided to put our jQuery library all the way at the bottom of our file. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required