Lập trình quán

Thảo luận về lập trình

Tìm hiểu Jquery 1

Posted by thinhnv2 on June 27, 2012

Bài tập 1:

Download index.html file (http://www.mediafire.com/?k7rk5k35xerd01e) and perform the following tasks.

Add a class of special to all of the <li> elements at the second level of the
nested list.
2. Add a class of year to all of the table cells in the third column of a table.

3. Add the class special to the first table row that has the word Tragedy in it.

4. Challenge: Select all of the list items (<li>s) containing a link (<a>). Add the
class afterlink to the sibling list items that follow the ones selected.
5.Challenge: Add the class tragedy to the closest ancestor <ul> of any .pdf link.

Bài tập 2:

Download file http://www.mediafire.com/?ambko3nper2nfbm  and perform the following task:

1. When Charles Dickens is clicked, apply the
selected style to it.
2. When a chapter title (<h3 class=”chapter-title”>) is double-clicked, toggle the visibility of the chapter text.
3.When the user presses the right arrow key, cycle to the next body class. Thekey code for the right arrow key is39.
4. Challenge: Use the console.log() function to log the coordinates of the mouse as it moves across any paragraph. (Note: console.log() displays its results via the Firebug extension for Firefox, Safari’s Web Inspector, or the Developer Tools in Chrome).
5. Challenge: Use .mousedown() and .mouseup() to track mouse events anywhere on the page. If the mouse button is released above where it was pressed, then add the hidden class to all paragraphs. If it is released below where it was pressed, then remove the hidden class from all paragraphs.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: