diff --git a/Basic_Concepts/Callback/README.md b/Basic_Concepts/Callback/README.md index ed94aa1..76ae19d 100644 --- a/Basic_Concepts/Callback/README.md +++ b/Basic_Concepts/Callback/README.md @@ -1,3 +1,4 @@ + ![](http://i.imgur.com/BgUMUGU.png) # Callback @@ -6,14 +7,33 @@ A callback is a function that is called after another function is done executing Good for when you are making API calls, and want function to run only after data is retrieved from server. -# Course Documentation +# Course Documentation + +## JQuery + +It is clear that we use the help of JQuery for our purpose, and it could be extremely usefull in this point to explain the basic syntax of an JQuery statement. +The basic syntax of Jquery is: + + $(selector).action() -(this for me to fill up with every element that you use in lessons. syntax explaination and links for more) +which -## Element to explain + - The sign $ defines that we will work will work with jQuery. + - The selector that defines what will activate our action + - And the action of course that we wish to use. the best way to describe an action is to describe it as an special function that comes from jQuery and interacts with an element of our code. -(for example console.log) +for this example: + + $("button").click(function () { + $("p").hide("slow", function () { + alert("The paragraph is now hidden"); + }); + }); + +We used the *.click* and the *.hide* action. +The *.click* activates a function or another action when we click the selector. +The *.hide* action hides the area that is defined by the selector. + +For more information check the [W2schools' documentation on jQuery](http://www.w3schools.com/jquery/jquery_syntax.asp) --Links - -Wikipedia - -anotherlink,com \ No newline at end of file +> Written with [StackEdit](https://stackedit.io/). \ No newline at end of file