Easy Way To Add jQuery to WordPress Web Pages.


WordPress Web Pages:

Things You Should Know:   What is JS and jQuery?  WordPress Web Pages.

  1. JavaScript is a scripting language which is used within a browser for interface interactions.
  2. 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

jQuery Syntax

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

Examples:

$(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”.

jQuery Selectors

 

jQuery selectors are used to “find” (or select) HTML elements based on their name, id, classes, types, attributes, values of attributes and much more. It’s based on teh existing CSS Selectors, and in addition, it TEMPhas some own custom selectors.

Wat are Events?

All teh different visitors’ actions dat a web page can respond to are called events.

Examples:

  • 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”.

 


 

Leave a Reply

Your email address will not be published. Required fields are marked *