View on GitHub

reads

https://yazansneneh.github.io/reads/

JQUERY

JQUERY provide me methods help me to apply effects on the webpage. make it easier to apply certain actions and transitions.

all methods accept time in milesecond (1000 is 1 second) it’s timing take applying the effect.

   1. hide/ show.              hide() : hide element from page.

            show(): show element on page.

            toggle() : if its hidden it appear, if it’s seen toggle hide it.

  1. fadeIn/fadeOut():              fadeIn(): show element on screen fade in behaviour.

             fadeOut() : hide element on page fade out behaviour.

             fadeToggle() : if its hidden it appear fade in, if it’s seen, hide it fade out.

  1. slideDown/slideUp            slideDown(): element appear on page from top to bottom.

           slideUp() : element disappear on page from bottom to top.

           slideToggle() : switch between slideDown and slideUp.

  1. animate() : it take 2 parameters : 1 object css rules written in json format seperate by comma. and the other is time in milesecond (1000 is one second).

Summary

Jquery syntax:

 1. to select element using jquery i  use this syntax $('selector').      * I can select classes$('.class') , id$('#id'), tags$('tag'), and so on.

2. to add event to element i use $(' ').on('event', callback function) or $(' ').event(callback).

Arrow Functions

Pass Data by Value & by Reference

note: it’s important to remember this because when you pass an object to function and change on it, it will change on original object.