jQuery 1.4 Animation Techniques - Index of
jQuery 1.4 Animation Techniques - Index of jQuery 1.4 Animation Techniques - Index of
[ 93 ] Chapter 4 Home Articles JavaScript JS Article 1 JS Article 2 JS Article 3 jQuery jQuery Article 1 jQuery Article 2 jQuery Article 3 Code Demos The first demo Another demo The third demo Portfolio
Sliding Animations 2. Save the new file as slideFlicker.html. We'll also need a new stylesheet for this example (in addition to fadeIn.css, which should already be linked to from the original file). In a new file in your text editor, add the following code: nav li { position:relative; } .subnav { display:none; width:100%; margin-left:-2px; border:2px solid #aaa; border-top:none; -moz-border-radius:0 0 7px 7px; -webkit-border-bottom-left-radius:7px; -webkit-border-bottom-right-radius:7px; border-radius:0 0 7px 7px; position:absolute; text-align:left; } div.subnav { width:244%; } .subnav ul { float:left; } .subnav li { float:none; border-right:none; } .subnav li a { border-bottom:none; font-size:14px; } .subnav li a:hover { background-color:#ccc; } .subnav li.first a { border-top:none; -moz-border-radius:0; -webkit-border-bottom-left-radius:0; -webkit-border-top-left-radius:0; border-radius:0; } .subnav li.last a { border-bottom:1px solid #fff; -moz-border-radius:0 0 7px 7px; -webkit-border-top-right-radius:0; -webkit-border-bottom-left-radius:7px; -webkit-border-bottom-right-radius:7px; border-radius:0 0 7px 7px; } .subnav .left li a { border-right:none; } .subnav .left li.last a { -moz-border-radius:0 0 0 7px; -webkit-border-bottom-right-radius:0; border-radius:0 0 0 7px; } .subnav .right li.last a { -moz-border-radius:0 0 7px 0; -webkit-border-bottom-left- radius:0; border-radius:0 0 7px 0; } .subnav li h2 { margin:0; padding:5px 0; font-size:12px; font-weight:normal; text-indent:20px; background-color:#eee; } [ 94 ]
- Page 64 and 65: 2. What format can these arguments
- Page 66 and 67: } var el = $(this); if (el.css("fil
- Page 68 and 69: [ 47 ] Chapter 2 Usually these meth
- Page 70 and 71: Time for action - animations with s
- Page 72 and 73: Download from Wow! eBook [ 51 ] Ch
- Page 74 and 75: 2. Save the changes as toggle.html.
- Page 76 and 77: 3 Managing Animations Like most of
- Page 78 and 79: [ 57 ] Chapter 3 A custom queue tha
- Page 80 and 81: If we wish to see how many function
- Page 82 and 83: 2. What does the queue() method ret
- Page 84 and 85: [ 63 ] Chapter 3 The argument we su
- Page 86 and 87: [ 65 ] Chapter 3 We pass a callback
- Page 88 and 89: [ 67 ] Chapter 3 The first argument
- Page 90 and 91: Delaying queue execution [ 69 ] Cha
- Page 92 and 93: [ 71 ] Chapter 3 Also note that the
- Page 94 and 95: 4 Sliding Animations Another type o
- Page 96 and 97: Time for action - creating a slide-
- Page 98 and 99: [ 77 ] Chapter 4 header form input
- Page 100 and 101: Pop quiz - sliding elements down 1.
- Page 102 and 103: Download from Wow! eBook }); }); $
- Page 104 and 105: Toggling the slide [ 83 ] Chapter 4
- Page 106 and 107: [ 85 ] Chapter 4 } h2 { margin:0; p
- Page 108 and 109: [ 87 ] Chapter 4 The previous scree
- Page 110 and 111: Pop quiz - using slideToggle 1. Wha
- Page 112 and 113: [ 91 ] Chapter 4 Easing is a great
- Page 116 and 117: [ 95 ] Chapter 4 3. Save this file
- Page 118 and 119: In the previous screenshot, we see
- Page 120 and 121: Pop quiz - fixing the flicker 1. Wh
- Page 122 and 123: 5 Custom Animations The predefined
- Page 124 and 125: An alternative syntax for animate()
- Page 126 and 127: [ 105 ] Chapter 5 width:295px; marg
- Page 128 and 129: [ 107 ] Chapter 5 What just happene
- Page 130 and 131: [ 109 ] Chapter 5 Although not esse
- Page 132 and 133: [ 111 ] Chapter 5 The previous scre
- Page 134 and 135: [ 113 ] Chapter 5 The styles we use
- Page 136 and 137: [ 115 ] Chapter 5 What just happene
- Page 138 and 139: }, html: copy, width: expander.widt
- Page 140 and 141: [ 119 ] Chapter 5 If the image alre
- Page 142 and 143: [ 121 ] Chapter 5 d. Two objects wh
- Page 144 and 145: [ 123 ] Chapter 5 text-align:center
- Page 146 and 147: [ 125 ] Chapter 5 What just happene
- Page 148 and 149: [ 127 ] Chapter 5 Finally, we retur
- Page 150 and 151: [ 129 ] Chapter 5 Once we've define
- Page 152 and 153: } }; $(config.selector).find("a").c
- Page 154 and 155: [ 133 ] Chapter 5 In the previous s
- Page 156: Have a go hero - extending the plug
- Page 159 and 160: Extended Animations with jQuery UI
- Page 161 and 162: Extended Animations with jQuery UI
- Page 163 and 164: Extended Animations with jQuery UI
Sliding <strong>Animation</strong>s<br />
2. Save the new file as slideFlicker.html. We'll also need a new stylesheet for this<br />
example (in addition to fadeIn.css, which should already be linked to from the<br />
original file). In a new file in your text editor, add the following code:<br />
nav li { position:relative; }<br />
.subnav {<br />
display:none; width:100%; margin-left:-2px; border:2px solid<br />
#aaa;<br />
border-top:none; -moz-border-radius:0 0 7px 7px;<br />
-webkit-border-bottom-left-radius:7px;<br />
-webkit-border-bottom-right-radius:7px; border-radius:0 0 7px<br />
7px;<br />
position:absolute; text-align:left;<br />
}<br />
div.subnav { width:244%; }<br />
.subnav ul { float:left; }<br />
.subnav li { float:none; border-right:none; }<br />
.subnav li a { border-bottom:none; font-size:14px; }<br />
.subnav li a:hover { background-color:#ccc; }<br />
.subnav li.first a {<br />
border-top:none; -moz-border-radius:0;<br />
-webkit-border-bottom-left-radius:0;<br />
-webkit-border-top-left-radius:0; border-radius:0;<br />
}<br />
.subnav li.last a {<br />
border-bottom:1px solid #fff; -moz-border-radius:0 0 7px 7px;<br />
-webkit-border-top-right-radius:0;<br />
-webkit-border-bottom-left-radius:7px;<br />
-webkit-border-bottom-right-radius:7px; border-radius:0 0 7px<br />
7px;<br />
}<br />
.subnav .left li a { border-right:none; }<br />
.subnav .left li.last a {<br />
-moz-border-radius:0 0 0 7px;<br />
-webkit-border-bottom-right-radius:0; border-radius:0 0 0 7px;<br />
}<br />
.subnav .right li.last a {<br />
-moz-border-radius:0 0 7px 0; -webkit-border-bottom-left-<br />
radius:0;<br />
border-radius:0 0 7px 0;<br />
}<br />
.subnav li h2 {<br />
margin:0; padding:5px 0; font-size:12px; font-weight:normal;<br />
text-indent:20px; background-color:#eee;<br />
}<br />
[ 94 ]