From c66db439cdf53111873e02275512b5d72f287f33 Mon Sep 17 00:00:00 2001 From: mitri4 Date: Fri, 20 Nov 2020 13:35:38 +0300 Subject: [PATCH] Update chapter17-jquery.md --- manuscript/chapter17-jquery.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manuscript/chapter17-jquery.md b/manuscript/chapter17-jquery.md index 253c61a..82fcb76 100644 --- a/manuscript/chapter17-jquery.md +++ b/manuscript/chapter17-jquery.md @@ -30,7 +30,7 @@ When it loads, you should be greeted with a load of JavaScript code that is seem {lang="html",linenos=off} -This now points the browser to look for JQuery in your `static/js` directory, rather than directly from the JQuery servers. Once you have done this, you'll want to then create a new, blank file in the `js` directory called `rango-query.js`. We'll be adding in some JavaScript code that uses JQuery to add functionality to our Rango app. Of course, we'll also need to add a reference to this new file in our `base.html` template, too. Underneath the line you just tweaked, add the following. +This now points the browser to look for JQuery in your `static/js` directory, rather than directly from the JQuery servers. Once you have done this, you'll want to then create a new, blank file in the `js` directory called `rango-jquery.js`. We'll be adding in some JavaScript code that uses JQuery to add functionality to our Rango app. Of course, we'll also need to add a reference to this new file in our `base.html` template, too. Underneath the line you just tweaked, add the following. {lang="html",linenos=off} @@ -91,7 +91,7 @@ This time, we have another button, but there is no code associated with it. Inst {lang="javascript",linenos=off} $(document).ready(function()) { - $('#about-btn').click(function()) { + $('#about-btn').click(function() { alert('You clicked the button using JQuery!'); }); @@ -195,4 +195,4 @@ This chapter has provided a very rudimentary guide to using JQuery, and how you T> ### Performing a Hard Refresh T> When working with `static` files -- especially JavaScript (that changes often when you are developing) -- you may find that your changes don't filter down to your browser, even though you saved the file! T> -T> Browsers are developed to try and reduce used bandwidth as much as possible. If you request a page multiple times, it is likely that after the initial request, the content you see will be stored in a *browser cache* on your computer. This means that when developing your project (and changing things rapidly), content may not be refreshed with the most up-to-date implementation. The solution to this problem is to either clear your browser's cache, or to perform a [*hard refresh*](https://refreshyourcache.com/en/cache/). The command you issue depends on your browser and operating system. Windows systems should work with CTRL+F5, with Macs using CMD+SHIFT+R. \ No newline at end of file +T> Browsers are developed to try and reduce used bandwidth as much as possible. If you request a page multiple times, it is likely that after the initial request, the content you see will be stored in a *browser cache* on your computer. This means that when developing your project (and changing things rapidly), content may not be refreshed with the most up-to-date implementation. The solution to this problem is to either clear your browser's cache, or to perform a [*hard refresh*](https://refreshyourcache.com/en/cache/). The command you issue depends on your browser and operating system. Windows systems should work with CTRL+F5, with Macs using CMD+SHIFT+R.