~bcsaller/juju-gui/charmFind

« back to all changes in this revision

Viewing changes to lib/yui/docs/dd/photo-browser.html

  • Committer: kapil.foss at gmail
  • Date: 2012-07-13 18:45:59 UTC
  • Revision ID: kapil.foss@gmail.com-20120713184559-2xl7be17egsrz0c9
reshape

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html>
2
 
<html lang="en">
3
 
<head>
4
 
    <meta charset="utf-8">
5
 
    <title>Example: Photo Browser</title>
6
 
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Maven+Pro:400,700">
7
 
    <link rel="stylesheet" href="../../build/cssgrids/grids-min.css">
8
 
    <link rel="stylesheet" href="../assets/css/main.css">
9
 
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
10
 
    <script src="../../build/yui/yui-min.js"></script>
11
 
</head>
12
 
<body>
13
 
 
14
 
<div id="doc">
15
 
    <h1>Example: Photo Browser</h1>
16
 
 
17
 
    
18
 
        <a href="#toc" class="jump">Jump to Table of Contents</a>
19
 
    
20
 
 
21
 
    <div class="yui3-g">
22
 
        <div class="yui3-u-3-4">
23
 
            <div id="main">
24
 
                <div class="content"><div class="intro">
25
 
<p>This example uses DD and <a href="http://developer.yahoo.com/yql/">YQL</a> to build a Photo Browser application. This example was part of the YUI 3 presentation by <a href="http://twiiter.com/davglass">@davglass</a> at <a href="http://openhacklondon.pbworks.com/">Open Hack : London</a></p>
26
 
</div>
27
 
 
28
 
<div class="example newwindow">
29
 
    <a href="photo-browser-example.html" target="_blank" class="button">
30
 
        View Example in New Window
31
 
    </a>
32
 
</div>
33
 
 
34
 
 
35
 
<h3 id="drag-and-drop">Drag and Drop</h3>
36
 
<p>In this example, Drag and Drop is heavily customized by using "event bubbling" and "custom proxies".</p>
37
 
<p>When you see <code>Y.DD.DDM.on</code> in the code, you are seeing the built-in "event bubbling".</p>
38
 
<p>The DD <code>dragNode</code> is the proxy node, we add some styles to it allowing it to look the way we want.</p>
39
 
 
40
 
<h3 id="yql">YQL</h3>
41
 
<p>Here is the Flickr YQL query used in this example.</p>
42
 
 
43
 
<pre class="code prettyprint">SELECT * FROM flickr.photos.search(100) WHERE
44
 
    (text=&quot;yuiconf&quot;)
45
 
AND (safe_search = 1)
46
 
AND (media = &quot;photos&quot;)
47
 
AND (api_key = &quot;1895311ec0d2e23431a6407f3e8dffcc&quot;)</pre>
48
 
 
49
 
<p><em>Note: You need to get your own API key, please do not use ours.</em></p>
50
 
 
51
 
<h3 id="slider-and-stylesheet">Slider and StyleSheet</h3>
52
 
<p>In this example, we will use the Slider control to dynamically manipulate a CSS Style Rule.</p>
53
 
<p>First, we need to create the slider and render it.</p>
54
 
 
55
 
<pre class="code prettyprint">&#x2F;&#x2F;Create and render the slider
56
 
var sl = new Y.Slider({
57
 
    length: &#x27;200px&#x27;, value: 40, max: 70, min: 5
58
 
}).render(&#x27;.horiz_slider&#x27;);</pre>
59
 
 
60
 
 
61
 
<p>Now, we listen for the Slider's <code>valueChange</code> event. This event is fired when the value of the Slider has changed.</p>
62
 
<p>Next we use the StyleSheet utility to dynamically change a style rule to resize the images.
63
 
The style rule that we want to change is <code>#yui-main .yui-g ul li</code>. When the Slider's value changes, we will take the value and divide it by 2, then use that as the percentage width of the li. 
64
 
This will give us the effect we want (resizing images) without touching all the images via the DOM.
65
 
</p>
66
 
 
67
 
<pre class="code prettyprint">&#x2F;&#x2F;Listen for the change
68
 
sl.after(&#x27;valueChange&#x27;,function (e) {
69
 
    &#x2F;&#x2F;Insert a dynamic stylesheet rule:
70
 
    var sheet = new Y.StyleSheet(&#x27;image_slider&#x27;);
71
 
    sheet.set(&#x27;#yui-main .yui-g ul li&#x27;, {
72
 
        width: (e.newVal &#x2F; 2) + &#x27;%&#x27;
73
 
    });
74
 
});</pre>
75
 
 
76
 
 
77
 
<h3 id="event-delegation">Event Delegation</h3>
78
 
<p>This listener listens for all <code>mouseup</code> events on the <code>document</code> and it will only fire when the target element matches the <code>*</code> selector (which should be all elements).</p>
79
 
<p>This way we can remove all the <code>selected</code> CSS classes from all the images in the browser when a <code>mouseup</code> occurs, only if the shift key was not pressed. We can then check to determine if the mouseup came from one of the images. If it has, add the selected class back to it.</p>
80
 
 
81
 
<pre class="code prettyprint">&#x2F;&#x2F;Listen for all mouseups on the document (selecting&#x2F;deselecting images)
82
 
Y.delegate(&#x27;mouseup&#x27; , function(e) {
83
 
    if (!e.shiftKey) {
84
 
        &#x2F;&#x2F;No shift key - remove all selected images
85
 
        wrapper.all(&#x27;img.selected&#x27;).removeClass(&#x27;selected&#x27;);
86
 
    }
87
 
    &#x2F;&#x2F;Check if the target is an image and select it.
88
 
    if (e.target.test(&#x27;#yui-main .yui-g ul li img&#x27;)) {
89
 
        e.target.addClass(&#x27;selected&#x27;);
90
 
    }
91
 
}, document, &#x27;*&#x27;);</pre>
92
 
 
93
 
 
94
 
<p>This listener, listens for all <code>click</code> events on the album list <code>#photoList li</code>. 
95
 
First, it stops the click, so the href is not followed. Next, it removes all the <code>selected</code> classes from the list. Then, it adds the <code>selected</code> class to the item that was clicked on.</p>
96
 
<p>After that UI setup, it uses Selectors to change the view of the images in the browser. 
97
 
First, it checks if we are viewing "all" or a "sub album". If all is selected, it removes the <code>hidden</code> class from all the images.
98
 
If it was an album, it adds the <code>hidden</code> class to all the images, then selects all the images with the class of its <code>id</code>, then it removes the hidden class from them.
99
 
</p>
100
 
<p>Basically, it hides all the images, then determines the ones it needs to show and removes the <code>hidden</code> class from them.</p>
101
 
 
102
 
<pre class="code prettyprint">&#x2F;&#x2F;Listen for all clicks on the &#x27;#photoList li&#x27; selector
103
 
Y.delegate(&#x27;click&#x27;, function(e) {
104
 
    &#x2F;&#x2F;Prevent the click
105
 
    e.halt();
106
 
    &#x2F;&#x2F;Remove all the selected items
107
 
    e.currentTarget.get(&#x27;parentNode&#x27;).all(&#x27;li.selected&#x27;).removeClass(&#x27;selected&#x27;);
108
 
    &#x2F;&#x2F;Add the selected class to the one that one clicked
109
 
    e.currentTarget.addClass(&#x27;selected&#x27;);
110
 
    &#x2F;&#x2F;The &quot;All Photos&quot; link was clicked
111
 
    if (e.currentTarget.hasClass(&#x27;all&#x27;)) {
112
 
        &#x2F;&#x2F;Remove all the hidden classes
113
 
        wrapper.all(&#x27;li&#x27;).removeClass(&#x27;hidden&#x27;);
114
 
    } else {
115
 
        &#x2F;&#x2F;Another &quot;album&quot; was clicked, get its id
116
 
        var c = e.target.get(&#x27;id&#x27;);
117
 
        &#x2F;&#x2F;Hide all items by adding the hidden class
118
 
        wrapper.all(&#x27;li&#x27;).addClass(&#x27;hidden&#x27;);
119
 
        &#x2F;&#x2F;Now, find all the items with the class name the same as the album id
120
 
        &#x2F;&#x2F;and remove the hidden class
121
 
        wrapper.all(&#x27;li.&#x27; + c).removeClass(&#x27;hidden&#x27;);
122
 
    }
123
 
}, document, &#x27;#photoList li&#x27;);</pre>
124
 
 
125
 
 
126
 
 
127
 
<h3 id="full-source">Full Source</h3>
128
 
<p>Here is the full commented JavaScript source for this example.</p>
129
 
 
130
 
<pre class="code prettyprint">YUI().use(&#x27;yql&#x27;, &#x27;node&#x27;, &#x27;anim&#x27;, &#x27;dd&#x27;, &#x27;dd-plugin&#x27;, &#x27;dd-drop-plugin&#x27;, &#x27;slider&#x27;, &#x27;stylesheet&#x27;, &#x27;event-delegate&#x27;, function(Y) {
131
 
    &#x2F;&#x2F;Get a reference to the wrapper to use later and add a loading class to it.
132
 
    var wrapper = Y.one(&#x27;#yui-main .yui-g ul&#x27;).addClass(&#x27;loading&#x27;);
133
 
    &#x2F;&#x2F;Set it&#x27;s height to the height of the viewport so we can scroll it.
134
 
    wrapper.setStyle(&#x27;height&#x27;, (wrapper.get(&#x27;winHeight&#x27;) - 50 )+ &#x27;px&#x27;);
135
 
    Y.on(&#x27;windowresize&#x27;, function() { wrapper.setStyle(&#x27;height&#x27;, (wrapper.get(&#x27;winHeight&#x27;) - 50 )+ &#x27;px&#x27;); });
136
 
    &#x2F;&#x2F;Make the YQL query.
137
 
    Y.YQL(&#x27;SELECT * FROM flickr.photos.search(100) WHERE (text=&quot;yuiconf&quot;) AND (safe_search = 1) AND (media = &quot;photos&quot;) AND (api_key = &quot;1895311ec0d2e23431a6407f3e8dffcc&quot;)&#x27;, function(e) {
138
 
        if (e.query &amp;&amp; e.query.results) {
139
 
            var photos = e.query.results.photo;
140
 
            &#x2F;&#x2F;Walk the returned photos array
141
 
            Y.each(photos, function(v, k) {
142
 
                &#x2F;&#x2F;Create our URL
143
 
                var url = &#x27;http:&#x2F;&#x27;+&#x27;&#x2F;static.flickr.com&#x2F;&#x27; + v.server + &#x27;&#x2F;&#x27; + v.id + &#x27;_&#x27; + v.secret + &#x27;_m.jpg&#x27;,
144
 
                    &#x2F;&#x2F;Create the image and the LI
145
 
                    li = Y.Node.create(&#x27;&lt;li class=&quot;loading&quot;&gt;&lt;img src=&quot;&#x27; + url + &#x27;&quot; title=&quot;&#x27; + v.title + &#x27;&quot;&gt;&lt;&#x2F;li&gt;&#x27;),
146
 
                    &#x2F;&#x2F;Get the image from the LI
147
 
                    img = li.get(&#x27;firstChild&#x27;);
148
 
                &#x2F;&#x2F;Append the li to the wrapper
149
 
                wrapper.appendChild(li);
150
 
                &#x2F;&#x2F;This little hack moves the tall images to the bottom of the list
151
 
                &#x2F;&#x2F;So they float better ;)
152
 
                img.on(&#x27;load&#x27;, function() {
153
 
                    &#x2F;&#x2F;Is the height longer than the width?
154
 
                    var c = ((this.get(&#x27;height&#x27;) &gt; this.get(&#x27;width&#x27;)) ? &#x27;tall&#x27; : &#x27;wide&#x27;);
155
 
                    this.addClass(c);
156
 
                    if (c === &#x27;tall&#x27;) {
157
 
                        &#x2F;&#x2F;Move it to the end of the list.
158
 
                        this.get(&#x27;parentNode.parentNode&#x27;).removeChild(this.get(&#x27;parentNode&#x27;));
159
 
                        wrapper.appendChild(this.get(&#x27;parentNode&#x27;));
160
 
                    }
161
 
                    this.get(&#x27;parentNode&#x27;).removeClass(&#x27;loading&#x27;);
162
 
                });
163
 
            });
164
 
            &#x2F;&#x2F;Get all the newly added li&#x27;s
165
 
            wrapper.all(&#x27;li&#x27;).each(function(node) {
166
 
                &#x2F;&#x2F;Plugin the Drag plugin
167
 
                this.plug(Y.Plugin.Drag, {
168
 
                    offsetNode: false
169
 
                });
170
 
                &#x2F;&#x2F;Plug the Proxy into the DD object
171
 
                this.dd.plug(Y.Plugin.DDProxy, {
172
 
                    resizeFrame: false,
173
 
                    moveOnEnd: false,
174
 
                    borderStyle: &#x27;none&#x27;
175
 
                });
176
 
            });
177
 
            &#x2F;&#x2F;Create and render the slider
178
 
            var sl = new Y.Slider({
179
 
                length: &#x27;200px&#x27;, value: 40, max: 70, min: 5
180
 
            }).render(&#x27;.horiz_slider&#x27;);
181
 
            &#x2F;&#x2F;Listen for the change
182
 
            sl.after(&#x27;valueChange&#x27;,function (e) {
183
 
                &#x2F;&#x2F;Insert a dynamic stylesheet rule:
184
 
                var sheet = new Y.StyleSheet(&#x27;image_slider&#x27;);
185
 
                sheet.set(&#x27;#yui-main .yui-g ul li&#x27;, {
186
 
                    width: (e.newVal &#x2F; 2) + &#x27;%&#x27;
187
 
                });
188
 
            });
189
 
            &#x2F;&#x2F;Remove the DDM as a bubble target..
190
 
            sl._dd.removeTarget(Y.DD.DDM);
191
 
            &#x2F;&#x2F;Remove the wrappers loading class
192
 
            wrapper.removeClass(&#x27;loading&#x27;);
193
 
            Y.one(&#x27;#ft&#x27;).removeClass(&#x27;loading&#x27;);
194
 
        }
195
 
    });
196
 
    &#x2F;&#x2F;Listen for all mouseup&#x27;s on the document (selecting&#x2F;deselecting images)
197
 
    Y.delegate(&#x27;mouseup&#x27;, function(e) {
198
 
        if (!e.shiftKey) {
199
 
            &#x2F;&#x2F;No shift key - remove all selected images
200
 
            wrapper.all(&#x27;img.selected&#x27;).removeClass(&#x27;selected&#x27;);
201
 
        }
202
 
        &#x2F;&#x2F;Check if the target is an image and select it.
203
 
        if (e.target.test(&#x27;#yui-main .yui-g ul li img&#x27;)) {
204
 
            e.target.addClass(&#x27;selected&#x27;);
205
 
        }
206
 
    }, document, &#x27;*&#x27;);
207
 
 
208
 
    &#x2F;&#x2F;Listen for all clicks on the &#x27;#photoList li&#x27; selector
209
 
    Y.delegate(&#x27;click&#x27;, function(e) {
210
 
        &#x2F;&#x2F;Prevent the click
211
 
        e.halt();
212
 
        &#x2F;&#x2F;Remove all the selected items
213
 
        e.currentTarget.get(&#x27;parentNode&#x27;).all(&#x27;li.selected&#x27;).removeClass(&#x27;selected&#x27;);
214
 
        &#x2F;&#x2F;Add the selected class to the one that one clicked
215
 
        e.currentTarget.addClass(&#x27;selected&#x27;);
216
 
        &#x2F;&#x2F;The &quot;All Photos&quot; link was clicked
217
 
        if (e.currentTarget.hasClass(&#x27;all&#x27;)) {
218
 
            &#x2F;&#x2F;Remove all the hidden classes
219
 
            wrapper.all(&#x27;li&#x27;).removeClass(&#x27;hidden&#x27;);
220
 
        } else {
221
 
            &#x2F;&#x2F;Another &quot;album&quot; was clicked, get it&#x27;s id
222
 
            var c = e.currentTarget.get(&#x27;id&#x27;);
223
 
            &#x2F;&#x2F;Hide all items by adding the hidden class
224
 
            wrapper.all(&#x27;li&#x27;).addClass(&#x27;hidden&#x27;);
225
 
            &#x2F;&#x2F;Now, find all the items with the class name the same as the album id
226
 
            &#x2F;&#x2F;and remove the hidden class
227
 
            wrapper.all(&#x27;li.&#x27; + c).removeClass(&#x27;hidden&#x27;);
228
 
        }
229
 
    }, document, &#x27;#photoList li&#x27;);
230
 
 
231
 
    &#x2F;&#x2F;Stop the drag with the escape key
232
 
    Y.one(document).on(&#x27;keyup&#x27;, function(e) {
233
 
        &#x2F;&#x2F;The escape key was pressed
234
 
        if ((e.keyCode === 27) || (e.charCode === 27)) {
235
 
            &#x2F;&#x2F;We have an active Drag
236
 
            if (Y.DD.DDM.activeDrag) {
237
 
                &#x2F;&#x2F;Stop the drag
238
 
                Y.DD.DDM.activeDrag.stopDrag();
239
 
            }
240
 
        }
241
 
    });
242
 
    &#x2F;&#x2F;On the drag:mouseDown add the selected class
243
 
    Y.DD.DDM.on(&#x27;drag:mouseDown&#x27;, function(e) {
244
 
        var img = e.target.get(&#x27;node&#x27;).one(&#x27;img&#x27;);
245
 
        &#x2F;&#x2F;If it&#x27;s a gesture event, then we need to act differently
246
 
        if (Y.DD.Drag.START_EVENT.indexOf(&#x27;gesture&#x27;) === 0) {
247
 
            if (img.hasClass(&#x27;selected&#x27;)) {
248
 
                img.removeClass(&#x27;selected&#x27;);
249
 
            } else {
250
 
                img.addClass(&#x27;selected&#x27;);
251
 
            }
252
 
        } else {
253
 
            img.removeClass(&#x27;selected&#x27;);
254
 
        }
255
 
    });
256
 
    &#x2F;&#x2F;On drag start, get all the selected elements
257
 
    &#x2F;&#x2F;Add the count to the proxy element and offset it to the cursor.
258
 
    Y.DD.DDM.on(&#x27;drag:start&#x27;, function(e) {
259
 
        var img = e.target.get(&#x27;node&#x27;).one(&#x27;img&#x27;).addClass(&#x27;selected&#x27;);
260
 
        &#x2F;&#x2F;How many items are selected
261
 
        var count = wrapper.all(&#x27;img.selected&#x27;).size();
262
 
        &#x2F;&#x2F;Set the style on the proxy node
263
 
        e.target.get(&#x27;dragNode&#x27;).setStyles({
264
 
            height: &#x27;25px&#x27;, width: &#x27;25px&#x27;
265
 
        }).set(&#x27;innerHTML&#x27;, &#x27;&lt;span&gt;&#x27; + count + &#x27;&lt;&#x2F;span&gt;&#x27;);
266
 
        &#x2F;&#x2F;Offset the dragNode
267
 
        e.target.deltaXY = [25, 5];
268
 
    });
269
 
    &#x2F;&#x2F;We dropped on a drop target
270
 
    Y.DD.DDM.on(&#x27;drag:drophit&#x27;, function(e) {
271
 
        &#x2F;&#x2F;get the images that are selected.
272
 
        var imgs = wrapper.all(&#x27;img.selected&#x27;),
273
 
            &#x2F;&#x2F;The xy position of the item we dropped on
274
 
            toXY = e.drop.get(&#x27;node&#x27;).getXY();
275
 
        
276
 
        imgs.each(function(node) {
277
 
            &#x2F;&#x2F;Clone the image, position it on top of the original and animate it to the drop target
278
 
            node.get(&#x27;parentNode&#x27;).addClass(e.drop.get(&#x27;node&#x27;).get(&#x27;id&#x27;));
279
 
            var n = node.cloneNode().set(&#x27;id&#x27;, &#x27;&#x27;).setStyle(&#x27;position&#x27;, &#x27;absolute&#x27;);
280
 
            Y.one(&#x27;body&#x27;).appendChild(n);
281
 
            n.setXY(node.getXY());
282
 
            new Y.Anim({
283
 
                node: n,
284
 
                to: {
285
 
                    height: 20, width: 20, opacity: 0,
286
 
                    top: toXY[1], left: toXY[0]
287
 
                },
288
 
                from: {
289
 
                    width: node.get(&#x27;offsetWidth&#x27;),
290
 
                    height: node.get(&#x27;offsetHeight&#x27;)
291
 
                },
292
 
                duration: .5
293
 
            }).run();
294
 
        });
295
 
        &#x2F;&#x2F;Update the count
296
 
        var count = wrapper.all(&#x27;li.&#x27; + e.drop.get(&#x27;node&#x27;).get(&#x27;id&#x27;)).size();
297
 
        e.drop.get(&#x27;node&#x27;).one(&#x27;span&#x27;).set(&#x27;innerHTML&#x27;, &#x27;(&#x27; + count + &#x27;)&#x27;);
298
 
    });
299
 
    &#x2F;&#x2F;Add drop support to the albums
300
 
    Y.all(&#x27;#photoList li&#x27;).each(function(node) {
301
 
        if (!node.hasClass(&#x27;all&#x27;)) {
302
 
            &#x2F;&#x2F;make all albums Drop Targets except the all photos.
303
 
            node.plug(Y.Plugin.Drop);
304
 
        }
305
 
    });
306
 
});</pre>
307
 
 
308
 
</div>
309
 
            </div>
310
 
        </div>
311
 
 
312
 
        <div class="yui3-u-1-4">
313
 
            <div class="sidebar">
314
 
                
315
 
                    <div id="toc" class="sidebox">
316
 
                        <div class="hd">
317
 
                            <h2 class="no-toc">Table of Contents</h2>
318
 
                        </div>
319
 
 
320
 
                        <div class="bd">
321
 
                            <ul class="toc">
322
 
<li>
323
 
<a href="#drag-and-drop">Drag and Drop</a>
324
 
</li>
325
 
<li>
326
 
<a href="#yql">YQL</a>
327
 
</li>
328
 
<li>
329
 
<a href="#slider-and-stylesheet">Slider and StyleSheet</a>
330
 
</li>
331
 
<li>
332
 
<a href="#event-delegation">Event Delegation</a>
333
 
</li>
334
 
<li>
335
 
<a href="#full-source">Full Source</a>
336
 
</li>
337
 
</ul>
338
 
                        </div>
339
 
                    </div>
340
 
                
341
 
 
342
 
                
343
 
                    <div class="sidebox">
344
 
                        <div class="hd">
345
 
                            <h2 class="no-toc">Examples</h2>
346
 
                        </div>
347
 
 
348
 
                        <div class="bd">
349
 
                            <ul class="examples">
350
 
                                
351
 
                                    
352
 
                                        <li data-description="A simple drag interaction that doesn&#x27;t require a drop interaction.">
353
 
                                            <a href="simple-drag.html">Simple Drag</a>
354
 
                                        </li>
355
 
                                    
356
 
                                
357
 
                                    
358
 
                                        <li data-description="How to apply the Drag Plugin to a node.">
359
 
                                            <a href="drag-plugin.html">Drag - Node plugin</a>
360
 
                                        </li>
361
 
                                    
362
 
                                
363
 
                                    
364
 
                                        <li data-description="A simple proxy drag interaction that doesn&#x27;t require a drop interaction.">
365
 
                                            <a href="proxy-drag.html">Drag - Proxy</a>
366
 
                                        </li>
367
 
                                    
368
 
                                
369
 
                                    
370
 
                                        <li data-description="How to constrain a draggable Node to another Node&#x27;s region.">
371
 
                                            <a href="constrained-drag.html">Drag - Constrained to a Region</a>
372
 
                                        </li>
373
 
                                    
374
 
                                
375
 
                                    
376
 
                                        <li data-description="Using interaction groups, this example demonstrates how to tie into the Drag &amp; Drop Utility&#x27;s interesting moments to provide visual affordances for the current drag operation.">
377
 
                                            <a href="groups-drag.html">Drag - Interaction Groups</a>
378
 
                                        </li>
379
 
                                    
380
 
                                
381
 
                                    
382
 
                                        <li data-description="The use of the drag shim when dragging nodes over other troublesome nodes.">
383
 
                                            <a href="shim-drag.html">Using the Drag Shim</a>
384
 
                                        </li>
385
 
                                    
386
 
                                
387
 
                                    
388
 
                                        <li data-description="How to use the Drop Target events to code your application.">
389
 
                                            <a href="drop-code.html">Using Drop Based Coding</a>
390
 
                                        </li>
391
 
                                    
392
 
                                
393
 
                                    
394
 
                                        <li data-description="How you can use the DD Scroll plugin to scroll the browser window as you drag.">
395
 
                                            <a href="winscroll.html">Window Scrolling</a>
396
 
                                        </li>
397
 
                                    
398
 
                                
399
 
                                    
400
 
                                        <li data-description="How to use DD.Delegate to create a scalable solution which supports multiple draggable items.">
401
 
                                            <a href="delegate.html">Drag Delegation</a>
402
 
                                        </li>
403
 
                                    
404
 
                                
405
 
                                    
406
 
                                        <li data-description="Using DD.Delegate to support dragging multiple items and dropping them onto a Drop Target.">
407
 
                                            <a href="delegate-drop.html">Drag Delegation with a Drop Target</a>
408
 
                                        </li>
409
 
                                    
410
 
                                
411
 
                                    
412
 
                                        <li data-description="How to use Drag plugins with a DD Delegate based solution.">
413
 
                                            <a href="delegate-plugins.html">Using Drag Plugins with Delegate</a>
414
 
                                        </li>
415
 
                                    
416
 
                                
417
 
                                    
418
 
                                        <li data-description="This example shows how to make a sortable list using Custom Event Bubbling.">
419
 
                                            <a href="list-drag.html">List Reorder w/Bubbling</a>
420
 
                                        </li>
421
 
                                    
422
 
                                
423
 
                                    
424
 
                                        <li data-description="This example shows how to make a sortable list using Custom Event Bubbling and Node Scrolling.">
425
 
                                            <a href="scroll-list.html">List Reorder w/Scrolling</a>
426
 
                                        </li>
427
 
                                    
428
 
                                
429
 
                                    
430
 
                                        <li data-description="How to make an animated node a Drop target.">
431
 
                                            <a href="anim-drop.html">Animated Drop Targets</a>
432
 
                                        </li>
433
 
                                    
434
 
                                
435
 
                                    
436
 
                                        <li data-description="Example Photo Browser application.">
437
 
                                            <a href="photo-browser.html">Photo Browser</a>
438
 
                                        </li>
439
 
                                    
440
 
                                
441
 
                                    
442
 
                                        <li data-description="Portal style example using Drag &amp; Drop Event Bubbling and Animation.">
443
 
                                            <a href="portal-drag.html">Portal Style Example</a>
444
 
                                        </li>
445
 
                                    
446
 
                                
447
 
                                    
448
 
                                
449
 
                                    
450
 
                                
451
 
                            </ul>
452
 
                        </div>
453
 
                    </div>
454
 
                
455
 
 
456
 
                
457
 
                    <div class="sidebox">
458
 
                        <div class="hd">
459
 
                            <h2 class="no-toc">Examples That Use This Component</h2>
460
 
                        </div>
461
 
 
462
 
                        <div class="bd">
463
 
                            <ul class="examples">
464
 
                                
465
 
                                    
466
 
                                
467
 
                                    
468
 
                                
469
 
                                    
470
 
                                
471
 
                                    
472
 
                                
473
 
                                    
474
 
                                
475
 
                                    
476
 
                                
477
 
                                    
478
 
                                
479
 
                                    
480
 
                                
481
 
                                    
482
 
                                
483
 
                                    
484
 
                                
485
 
                                    
486
 
                                
487
 
                                    
488
 
                                
489
 
                                    
490
 
                                
491
 
                                    
492
 
                                
493
 
                                    
494
 
                                
495
 
                                    
496
 
                                
497
 
                                    
498
 
                                        <li data-description="Working with multiple YUI instances.">
499
 
                                            <a href="../yui/yui-multi.html">Multiple Instances</a>
500
 
                                        </li>
501
 
                                    
502
 
                                
503
 
                                    
504
 
                                        <li data-description="Use StyleSheet to adjust the CSS rules applying a page theme from user input">
505
 
                                            <a href="../stylesheet/stylesheet-theme.html">Adjusting a Page Theme on the Fly</a>
506
 
                                        </li>
507
 
                                    
508
 
                                
509
 
                            </ul>
510
 
                        </div>
511
 
                    </div>
512
 
                
513
 
            </div>
514
 
        </div>
515
 
    </div>
516
 
</div>
517
 
 
518
 
<script src="../assets/vendor/prettify/prettify-min.js"></script>
519
 
<script>prettyPrint();</script>
520
 
 
521
 
</body>
522
 
</html>