吉吉于

free

jQuery 抄袭笔记(16) : 表格

当鼠标移动到表格上,呈现黑色状态。

01 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
02 <html xmlns=“http://www.w3.org/1999/xhtml”>
03 </span>
04 <meta http-equiv=“Content-Type” content=“text/html; charset=gb2312″ />
05 </span>Hello Lazynight!<span style="color: #ff4400; font-weight: bold;"></title></span><br /> <span style="color: #696969;">06</span> <span style="color: #ff4400; font-weight: bold;"><script </span><span style="color: #ffff00;">src=</span><span style="color: #d13800;">“http://www.cssrain.cn/demo/jquery.js”</span> <span style="color: #ffff00;">type=</span><span style="color: #d13800;">“text/javascript”</span><span style="color: #ff4400; font-weight: bold;">></script></span><br /> <span style="color: #696969;">07</span> <span style="color: #ff4400; font-weight: bold;"><script </span><span style="color: #ffff00;">type=</span><span style="color: #d13800;">“text/javascript”</span><span style="color: #ff4400; font-weight: bold;">></span><br /> <span style="color: #696969;">08</span> <span style="color: #c0c0c0;">$</span>(<span style="color: #c0c0c0;">document</span><span style="color: #c0c0c0;">).</span><span style="color: #c0c0c0;">ready</span>(<span style="color: #ff4400; font-weight: bold;">function</span><span style="color: #c0c0c0;">(){</span><br /> <span style="color: #696969;">09</span>     <span style="color: #c0c0c0;">$</span>(<span style="color: #d13800;">“.lazy_table tr”</span><span style="color: #c0c0c0;">).</span><span style="color: #c0c0c0;">mouseover</span>(<span style="color: #ff4400; font-weight: bold;">function</span><span style="color: #c0c0c0;">(){</span><br /> <span style="color: #f810b0;">10</span>         <span style="color: #c0c0c0;">$</span>(<span style="color: #ff4400; font-weight: bold;">this</span><span style="color: #c0c0c0;">).</span><span style="color: #c0c0c0;">addClass</span>(<span style="color: #d13800;">“over”</span><span style="color: #c0c0c0;">);}).</span><span style="color: #c0c0c0;">mouseout</span>(<span style="color: #ff4400; font-weight: bold;">function</span><span style="color: #c0c0c0;">(){</span><br /> <span style="color: #696969;">11</span>         <span style="color: #c0c0c0;">$</span>(<span style="color: #ff4400; font-weight: bold;">this</span><span style="color: #c0c0c0;">).</span><span style="color: #c0c0c0;">removeClass</span>(<span style="color: #d13800;">“over”</span><span style="color: #c0c0c0;">);})</span><br /> <span style="color: #696969;">12</span>     <span style="color: #c0c0c0;">$</span>(<span style="color: #d13800;">“.lazy_table tr:even”</span><span style="color: #c0c0c0;">).</span><span style="color: #c0c0c0;">addClass</span>(<span style="color: #d13800;">“lazy”</span>);<br /> <span style="color: #696969;">13</span> <span style="color: #c0c0c0;">});</span><br /> <span style="color: #696969;">14</span> <span style="color: #ff4400; font-weight: bold;"></script></span><br /> <span style="color: #f810b0;">15</span> <span style="color: #ff4400; font-weight: bold;"><style></span><br /> <span style="color: #696969;">16</span> <span style="color: #ff4400; font-weight: bold;">th</span>    <span style="color: #c0c0c0;">{</span><br /> <span style="color: #696969;">17</span>         <span style="color: #ff4400; font-weight: bold;">background-color</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">#000</span>;<br /> <span style="color: #696969;">18</span>         <span style="color: #ff4400; font-weight: bold;">color</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">#fff</span>;<br /> <span style="color: #696969;">19</span>         <span style="color: #ff4400; font-weight: bold;">height</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">30px</span>;<br /> <span style="color: #f810b0;">20</span>     <span style="color: #c0c0c0;">}</span><br /> <span style="color: #696969;">21</span> <span style="color: #ff4400; font-weight: bold;">td</span>    <span style="color: #c0c0c0;">{</span><br /> <span style="color: #696969;">22</span>         <span style="color: #ff4400; font-weight: bold;">padding</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">5px</span> <span style="color: #c0c0c0;">10px</span>;<br /> <span style="color: #696969;">23</span>         <span style="color: #ff4400; font-weight: bold;">text-align</span><span style="color: #c0c0c0;">:</span><span style="color: #ff4400; font-weight: bold;">center</span>;<br /> <span style="color: #696969;">24</span>     <span style="color: #c0c0c0;">}</span><br /> <span style="color: #f810b0;">25</span> <span style="color: #ff4400; font-weight: bold;">tr</span><span style="color: #c0c0c0;">.lazy</span> <span style="color: #ff4400; font-weight: bold;">td</span>  <span style="color: #c0c0c0;">{</span><br /> <span style="color: #696969;">26</span>                 <span style="color: #ff4400; font-weight: bold;">background-color</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">#bb3355</span>;<br /> <span style="color: #696969;">27</span>                 <span style="color: #ff4400; font-weight: bold;">color</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">#fff</span>;<br /> <span style="color: #696969;">28</span>             <span style="color: #c0c0c0;">}</span><br /> <span style="color: #696969;">29</span> <span style="color: #ff4400; font-weight: bold;">tr</span><span style="color: #c0c0c0;">.over</span> <span style="color: #ff4400; font-weight: bold;">td</span>    <span style="color: #c0c0c0;">{</span><br /> <span style="color: #f810b0;">30</span>                 <span style="color: #ff4400; font-weight: bold;">background-color</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">#000</span>;<br /> <span style="color: #696969;">31</span>                 <span style="color: #ff4400; font-weight: bold;">color</span><span style="color: #c0c0c0;">:</span><span style="color: #c0c0c0;">#fff</span>;<br /> <span style="color: #696969;">32</span>             <span style="color: #c0c0c0;">}</span><br /> <span style="color: #696969;">33</span> <span style="color: #ff4400; font-weight: bold;"></style></span><br /> <span style="color: #696969;">34</span> <span style="color: #ff4400; font-weight: bold;"></head></span><br /> <span style="color: #f810b0;">35</span> <span style="color: #ff4400; font-weight: bold;"><body></span><br /> <span style="color: #696969;">36</span> <span style="color: #ff4400; font-weight: bold;"><table</span> <span style="color: #ffff00;">class=</span><span style="color: #d13800;">“lazy_table”</span> <span style="color: #ffff00;">width=</span><span style="color: #d13800;">“50%”</span> <span style="color: #ffff00;">border=</span><span style="color: #d13800;">“0″</span> <span style="color: #ffff00;">cellspacing=</span><span style="color: #d13800;">“0″</span> <span style="color: #ffff00;">cellpadding=</span><span style="color: #d13800;">“0″</span><span style="color: #ff4400; font-weight: bold;">></span><br /> <span style="color: #696969;">37</span> <span style="color: #ff4400; font-weight: bold;"><thead></span><br /> <span style="color: #696969;">38</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">39</span>         <span style="color: #ff4400; font-weight: bold;"><th></span>曲名<span style="color: #ff4400; font-weight: bold;"></th></span><br /> <span style="color: #f810b0;">40</span>         <span style="color: #ff4400; font-weight: bold;"><th></span>歌手<span style="color: #ff4400; font-weight: bold;"></th></span><br /> <span style="color: #696969;">41</span>         <span style="color: #ff4400; font-weight: bold;"><th></span>专辑<span style="color: #ff4400; font-weight: bold;"></th></span><br /> <span style="color: #696969;">42</span>         <span style="color: #ff4400; font-weight: bold;"><th></span>风格<span style="color: #ff4400; font-weight: bold;"></th></span><br /> <span style="color: #696969;">43</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">44</span> <span style="color: #ff4400; font-weight: bold;"></thead></span><br /> <span style="color: #f810b0;">45</span> <span style="color: #ff4400; font-weight: bold;"><tbody></span><br /> <span style="color: #696969;">46</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">47</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">48</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">49</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #f810b0;">50</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">51</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">52</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">53</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">54</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #f810b0;">55</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">56</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">57</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">58</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">59</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #f810b0;">60</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">61</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">62</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">63</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">64</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #f810b0;">65</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">66</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">67</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">68</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">69</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #f810b0;">70</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">71</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">72</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">73</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">74</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #f810b0;">75</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">76</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">77</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">78</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">79</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #f810b0;">80</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">81</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">82</span>     <span style="color: #ff4400; font-weight: bold;"><tr></span><br /> <span style="color: #696969;">83</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>曲名<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">84</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>歌手<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #f810b0;">85</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>专辑<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">86</span>         <span style="color: #ff4400; font-weight: bold;"><td></span>风格<span style="color: #ff4400; font-weight: bold;"></td></span><br /> <span style="color: #696969;">87</span>     <span style="color: #ff4400; font-weight: bold;"></tr></span><br /> <span style="color: #696969;">88</span> <span style="color: #ff4400; font-weight: bold;"></tbody></span><br /> <span style="color: #696969;">89</span> <span style="color: #ff4400; font-weight: bold;"></table></span><br /> <span style="color: #f810b0;">90</span> <span style="color: #ff4400; font-weight: bold;"></body></span><br /> <span style="color: #696969;">91</span> <span style="color: #ff4400; font-weight: bold;"></html></span> </div> <span style="color: #ff6600;"><a href="http://down.qiannao.com/space/file/flowerowl/-4e0a-4f20-5206-4eab/Lazy16_-8868-683c.rar/.page" target="_blank"><span style="color: #ff6600;">下载源码</span></a></span> 转载请注明:[于哲的博客][1] » [jQuery 抄袭笔记(16) : 表格][2] [1]: http://lazynight.me [2]: http://lazynight.me/551.html </td></span></td></span></td></span></td></span></tr></span></td></span></td></span></td></span></td></span></tr></span></td></span></td></span></td></span></td></span></tr></span></td></span></td></span></td></span></td></span></tr></span></td></span></td></span></td></span></td></span></tr></span></td></span></td></span></td></span></td></span></tr></span></td></span></td></span></td></span></td></span></tr></span></tbody></span></th></span></th></span></th></span></th></span></tr></span></thead></span></body></span>