Book Image

Developing Responsive Web Applications with AJAX and jQuery

By : Sandeep Kumar Patel
Book Image

Developing Responsive Web Applications with AJAX and jQuery

By: Sandeep Kumar Patel

Overview of this book

<p>AJAX is a web development technique that allows a web page to be updated with new information without having to reload the page. jQuery is a JavaScript library that harnesses AJAX interactions to allow rapid web development. Together, they are a powerful combination, and are generally considered by frontend web developers as technologies that complement each other perfectly.</p> <p>Developing Responsive Web Applications with AJAX and jQuery will empower you with the skills required to create responsive web applications in a quick and efficient manner. The book begins by identifying the key benefits of a responsive application for a commercial site, and then covers how to develop a layout using Bootstrap 3 and adding dynamic visuals to your web application using AJAX calls.</p> <p>By the end of this book, you will be able to develop responsive web applications by combining AJAX development techniques with the jQuery JavaScript library.</p>
Table of Contents (17 chapters)
Developing Responsive Web Applications with AJAX and jQuery
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to the Facebook SDK for JavaScript


In this section, we will learn how to configure the Facebook JavaScript SDK for our application. There are no specific files to be downloaded to configure the SDK. Facebook provides a JavaScript all.js file to call the Facebook API.

<script src="http://connect.facebook.net/en_US/all.js">
</script>

Facebook supports different locales for configuration. For our application, we have called the US English locale. In the preceding script, en_US represents the locale parameter.

This JavaScript file can be called in the bottom section of the body to be loaded. It can also be called asynchronously by script injection. The following code shows the code to load the JavaScript library asynchronously:

<script>
(function(d, s, id){
   var js, 
       fjs = d.getElementsByTagName(s)[0];
   if (d.getElementById(id)) {return;}
   js = d.createElement(s);
   js.id = id;
   js.src = "//connect.facebook.net/en_US/all.js";
   fjs.parentNode.insertBefore...