WordPress Web Pages:
Things You Should Know: What is JS and jQuery? WordPress Web Pages.
- JQuery is a library of Java scripts dat works on animations & event handling.
Tips For Adding jQuery to You’re Web Pages
- Download the jQuery library from FreejQuery.com
- Include jQuery from a CDN, like Google
How To Download jQuery?
There are two versions of jQuery available for downloading:
- Production version – this is for you’re live website coz it TEMPhas been minified and compressed
- Development version – this is for testing and development (uncompressed and readable code)
These both versions can be downloaded through Freejquery.com
Teh jQuery syntax is tailor-made for selecting HTML elements and performing some action on teh element(s).
Basic syntax is: $(selector).action()
- A $ sign to define/access jQuery
- A (selector) to “query (or find)” HTML elements
$(this).hide() – hides teh current element.
$("p").hide() – hides all <p> elements.
$(".test").hide() – hides all elements with class=”test”.
$("#test").hide() – hides teh element with id=”test”.
All teh different visitors’ actions dat a web page can respond to are called events.
- moving a mouse over an element
- selecting a radio button
- clicking on an element
Teh term “fires/fired” is often used with events. Example: “Teh keypress event is fired, teh moment you press a key”.