- How do we include
jQuery
into our html projects? What are the pros and cons of each option? - What is the first thing to do in your javascript to start using jQuery?
- Given the following html use jQuery code solve the following questions
<body>
<div>
<ul> <!-- awesome list -->
<li>first</li>
<li>second</li>
<li>third</li>
</ul>
</div>
<ul> <!-- random list -->
<li>ha</li>
<li>he</li>
<li>ho</li>
<li>forth</li>
</ul>
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr> <!-- perfect start-->
<td>Denis</td>
<td>Cheung</td>
</tr> <!-- perfect end-->
</tbody>
</table>
<form id="name-form">
<div>
<label>First name</label>
<input type="text" id="first-name">
</div>
<div>
<label>Last name</label>
<input type="text" id="last-name">
</div>
<button type="submit" id="submit-name"></button>
</form>
</body>
- Select only the
<li>
within awesome list and set thecolor
tored
- Select the second
<li>
in both awesome list and random list and set the background color to blue. - Move the
<li>forth</li>
from random list into the end of awesome list. - Delete random list.
- Target all
<li>
from awesome list and reverse their text. (eg.<li>first</li>
will become<li>tsrif</li>
) - Retrieve the
First name
andLast name
input and save them to a variable. - With reference to the html structure from perfect start to perfect end, add an element with the same structure but with your name
- Append a new element to
tbody
with the user'sinputs
when the button is clicked - What code can be put into the answer from above to clear input field?
Happy Coding!