-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathplay.js
36 lines (26 loc) · 1.06 KB
/
play.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Playing with JQUERY
//
$(document).ready(function(){
console.log('Document is ready');
// Jquery Workout
// 1. Print all the post titles in the console
// 2. Print all the post categories
// 3. Give all the avataras a 5px black border
// 4. Make the edit title work
// It prompts a window asking for the new title
// On submit the title changes
// 5. Destroy
// On click remove prompt a confirmation for the user.
// Are you sure?
// If the user confirms the post is removed. If not nothing happens
// 6. Make the edit content work
// On click in the <p> the text content turns into a text area
// A button appears at the bottom that saves "save".
// On click in the button the textarea turns back to simple text
// 7. Make the edit author work
// On click the author turns into a select field
// There are three available authors (Adrian, Amed and Ana)
// When the select changes the avatar changes as well
// On the side of the select field a link to save appears.
// If clicked the author turns back into a link
});