jQuery(Write less, do more)
-
jQuery: JavaScript file that you include in your web pages . offers a simple way to achieve a variety of common JavaScript tasks quickly and consistently, across all major browsers and without any fallback code needed.
- Select elements
- Perform tasks
- Handle events
Why use JQuery
- Simple selectors
- Common tasks in less code
- The • htm 1 () and • text () methods both retrieve and update the content of elements.
- Getting and setting attribute values (.attr() , . removeAttr() , . addClass() , .removeClass())
- Inserting elements ( .before() , .after() , .prepend() , .append()
- Working with each element in aselection ( .each() , this or $(this) )
The position of elements can affect how quickly a web page seems to load.
BASIC EFFECTS:
- . show() Displays selected elements
- . hi de() Hides selected elements
- . togg 1 e () Toggles between showing and hiding selected elements
FADING EFFECTS
- .fadeln() Fades in selected elements making them opaque
- .fadeout() Fades out selected elements making them transparent
- .fade To() Changes opacity of selected elements
- .fade Togg 1 e (} Hides or shows selected elements by changing their opacity (the opposite of their current state)
______
Notes
DOM
The HTML DOM is an Object Model for HTML. It defines:
HTML elements as objects
Properties for all HTML elements
Methods for all HTML elements
Events for all HTML elements
The HTML DOM is an API (Programming Interface) for JavaScript:
JavaScript can add/change/remove HTML elements
JavaScript can add/change/remove HTML attributes
JavaScript can add/change/remove CSS styles
JavaScript can react to HTML events
JavaScript can add/change/remove HTML events
Some OF Pair Programming Advantages
- Two heads are better than one.
If the driver encounters a hitch with the code, there will be two of them who’ll solve the problem.
- More efficient.
Common thinking is that it slows down the project completion time because you are effectively putting two programmers to develop a single program, instead of having them work independently on two different programs. But studies have shown that two programmers working on the same program are only 15% slower than when these programmers work independently, rather than the presupposed 50% slow down.
- Develops your staff’s interpersonal skills.
Collaborating on a single project helps your team to appreciate the value of communication and teamwork.