Kamis, 04 Januari 2018

jQuery is essentially a library for manipulating DOM (Document Object Model). Dom is a tree-tree representation of all elements contained in a Web page, and jQuery simplifies the syntax for searching, sorting, and manipulating the DOM elements. For example, jQuery can be used to search for elements in documents with certain properties (eg all elements with h1 tags), change one or more of these attributes (eg color, visibility), or make it respond to an event (eg when mouse is clicked) .

jQuery also provides a paradigm for handling out-of-date events and manipulation of DOM basic elements. Event assignment and event callback function can be done with just one step or one line of code. jQuery also aims to combine JavaScript functionality that is used (eg: fade in and fade out when hiding elements, animation by manipulating CSS properties).

The advantages of using jQuery are:

Encouraging the separation between JavaScript and HTML: The jQuery library provides a simple syntax for adding event handling to the DOM by simply using JavaScipt instead of adding HTML attribute events to call JavaScript functions. This is what drives developers to separate JavaScript code from HTML markup
Summary and clarity: jQuery promotes brevity and clarity of code with features like chainable function and shorthand function names.
Eliminating incompatibilities between browsers: The JavaScript engine in each browser must be slightly different from one to another, so JavaScript code running on a browser may not run on other browsers. Like any other JavaScript toolkit, jQuery takes care of all the inconsistencies between browsers and provides a consistent interface that works across different browsers.
Extensions: New events, elements, and methods can be easily added and then can be reused as a plugin.

Tidak ada komentar:

Posting Komentar

Follow Us @soratemplates