Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying jQuery 2.0 Development Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
jQuery 2.0 Development Cookbook

jQuery 2.0 Development Cookbook

By : Leon Revill
4.2 (12)
close
close
jQuery 2.0 Development Cookbook

jQuery 2.0 Development Cookbook

4.2 (12)
By: Leon Revill

Overview of this book

Taking a recipe-based approach, this book presents numerous practical examples that you can use directly in your applications. The book covers the essential issues you will face while developing your web applications and gives you solutions to them. The recipes in this book are written in a manner that rapidly takes you from beginner to expert level. This book is for web developers of all skill levels. Although some knowledge of JavaScript, HTML, and CSS is required, this Cookbook will teach jQuery newcomers all the basics required to move on to the more complex examples of this book, which will benefit the more seasoned jQuery developer. If you want to learn how to create modern website features quickly, using best practice techniques, then this book is for you.
Table of Contents (12 chapters)
close
close
11
Index

Loading HTML from a web server into a page

At the most basic level, AJAX allows us to update a single page element with new content from a web server. This recipe looks at how we can set up some data to be received from a web server with PHP and how we can then receive this data and apply it to our web page.

Getting ready

Ensure that you have a web server running and have access to its web root.

How to do it…

Perform the following steps to create the required PHP, MySQL, and HTML in order to understand how to use jQuery with AJAX:

  1. Before we can request for any data from the web server to be displayed within our web page, we need to be able to serve this data from a web server. Create a PHP file named request-1.php. Add the following PHP code and save it within the web root of your web server:
    <?php
      $num = rand(1, 5);
      switch ($num) {
        case 1:
          $quote = "Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning.";
      ...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
jQuery 2.0 Development Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon