1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
3 | <head> |
---|
4 | <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.js"> |
---|
5 | </script> |
---|
6 | |
---|
7 | <style> |
---|
8 | * {text-align: right} |
---|
9 | h3 {font-size:100%;margin:0;padding:0;} |
---|
10 | .container {height:128px;width:256px;float:right;overflow:visible;background-color:blue} |
---|
11 | .summary {overflow:visible;float:right;width:100%} |
---|
12 | .topic {width:100%;height:1.75em;float:right;line-height:1.75em;background-color:#EEE;} |
---|
13 | .topic h3 {display: inline-block;} |
---|
14 | .button {float:left;height:24px;width:24px;background-color:green} |
---|
15 | </style> |
---|
16 | |
---|
17 | </head> |
---|
18 | <body> |
---|
19 | <div class="container"> |
---|
20 | <div class="summary"> |
---|
21 | <div class="topic"> |
---|
22 | <h3>123</h3> |
---|
23 | <div class="button" style="display: block;"> |
---|
24 | </div> |
---|
25 | </div> |
---|
26 | </div> |
---|
27 | </div> |
---|
28 | <script type="text/javascript"> |
---|
29 | $(document).ready(function() { |
---|
30 | $(".container").hover( |
---|
31 | function () { |
---|
32 | $(this).find('.button').fadeIn('fast'); |
---|
33 | }, |
---|
34 | function () { |
---|
35 | $(this).find('.button').fadeOut('fast'); |
---|
36 | }) |
---|
37 | }); |
---|
38 | </script> |
---|
39 | </body> |
---|
40 | </html> |
---|