<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Combining Selectables And Draggables Using jQuery UI</title>
	<atom:link href="http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/</link>
	<description></description>
	<lastBuildDate>Fri, 26 Mar 2010 00:04:08 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mircea</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-588</link>
		<dc:creator>Mircea</dc:creator>
		<pubDate>Fri, 05 Feb 2010 18:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-588</guid>
		<description>Great demo!
Is there any way to make it work with jQuery 1.4?
It does not work with 1.4 and I can&#039;t figure it out why.

Thank you.</description>
		<content:encoded><![CDATA[<p>Great demo!<br />
Is there any way to make it work with jQuery 1.4?<br />
It does not work with 1.4 and I can&#8217;t figure it out why.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madman</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-583</link>
		<dc:creator>Madman</dc:creator>
		<pubDate>Tue, 02 Feb 2010 12:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-583</guid>
		<description>Hey, thank you! Helped me a lot! *Thumbs Up*</description>
		<content:encoded><![CDATA[<p>Hey, thank you! Helped me a lot! *Thumbs Up*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 25 Tutorials and Resources for Learning jQuery UI &#124; EMDMA</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-566</link>
		<dc:creator>25 Tutorials and Resources for Learning jQuery UI &#124; EMDMA</dc:creator>
		<pubDate>Wed, 20 Jan 2010 23:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-566</guid>
		<description>[...] Combining Selectables And Draggables Using jQuery UI [...]</description>
		<content:encoded><![CDATA[<p>[...] Combining Selectables And Draggables Using jQuery UI [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 25 Tutorials and Resources for Learning jQuery UI &#124; Programming Blog</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-564</link>
		<dc:creator>25 Tutorials and Resources for Learning jQuery UI &#124; Programming Blog</dc:creator>
		<pubDate>Wed, 20 Jan 2010 11:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-564</guid>
		<description>[...] Combining Selectables And Draggables Using jQuery UI [...]</description>
		<content:encoded><![CDATA[<p>[...] Combining Selectables And Draggables Using jQuery UI [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 25 Tutorials and Resources for Learning jQuery UI &#183; rogdykker</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-562</link>
		<dc:creator>25 Tutorials and Resources for Learning jQuery UI &#183; rogdykker</dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-562</guid>
		<description>[...] Combining Selectables And Draggables Using jQuery UI [...]</description>
		<content:encoded><![CDATA[<p>[...] Combining Selectables And Draggables Using jQuery UI [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 25 Tutorials and Resources for Learning jQuery UI - Speckyboy Design Magazine</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-560</link>
		<dc:creator>25 Tutorials and Resources for Learning jQuery UI - Speckyboy Design Magazine</dc:creator>
		<pubDate>Wed, 20 Jan 2010 09:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-560</guid>
		<description>[...] Combining Selectables And Draggables Using jQuery UI [...]</description>
		<content:encoded><![CDATA[<p>[...] Combining Selectables And Draggables Using jQuery UI [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-548</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Fri, 04 Dec 2009 03:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-548</guid>
		<description>Can you at least provide a working demo?

If it doesn&#039;t work with FF, IE, or Opera, I don&#039;t see much point in even bothering with the code.</description>
		<content:encoded><![CDATA[<p>Can you at least provide a working demo?</p>
<p>If it doesn&#8217;t work with FF, IE, or Opera, I don&#8217;t see much point in even bothering with the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Smullin</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-544</link>
		<dc:creator>Mike Smullin</dc:creator>
		<pubDate>Mon, 30 Nov 2009 05:15:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-544</guid>
		<description>Ryan, the code works great--but only if Firebug is enabled. I almost passed it up but since you are ranking #1 on Google for this term I gave it a few shots and eventually discovered the reason when I enabled Firebug to see if I could figure out where it was broken.

It&#039;s probably because you&#039;re using console.log().

Hope this helps you help the other readers! :)</description>
		<content:encoded><![CDATA[<p>Ryan, the code works great&#8211;but only if Firebug is enabled. I almost passed it up but since you are ranking #1 on Google for this term I gave it a few shots and eventually discovered the reason when I enabled Firebug to see if I could figure out where it was broken.</p>
<p>It&#8217;s probably because you&#8217;re using console.log().</p>
<p>Hope this helps you help the other readers! <img src='http://www.ryancoughlin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Coughlin</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-515</link>
		<dc:creator>Ryan Coughlin</dc:creator>
		<pubDate>Fri, 07 Aug 2009 19:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-515</guid>
		<description>Did the code in the demo file help you at all? Also, thanks for posting your working code. Glad you got it working.</description>
		<content:encoded><![CDATA[<p>Did the code in the demo file help you at all? Also, thanks for posting your working code. Glad you got it working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sinan</title>
		<link>http://www.ryancoughlin.com/2008/11/23/combining-selectables-and-draggables-using-jquery-ui/comment-page-1/#comment-497</link>
		<dc:creator>Sinan</dc:creator>
		<pubDate>Sun, 28 Jun 2009 20:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryancoughlin.com/?p=258#comment-497</guid>
		<description>It was hard to get it work from the code snippets above but thanks for sharing.

	// creates the selected variable
	// we are going to be storing the selected objects in here
	var selected = $([]), offset = {top:0, left:0};
	console.log(&quot;This is the value of selected when it is created &quot; +selected + &quot;&quot;);

	// initiate the selectable id to be recognized by UI
	$(&quot;#selectable1&quot;).selectable({
		filter: &#039;div&#039;,
	});

	// declare draggable UI and what we are going to be doing on start
	$(&quot;#selectable1 div&quot;).draggable({
	     start: function(ev, ui) {
			selected = $(&quot;.ui-selected&quot;).each(function() {
			   var el = $(this);
				el.data(&quot;offset&quot;, el.offset());
				//$(this).text(&quot;Selected and dragging object(s)&quot;);
		  	});

			if( !$(this).hasClass(&quot;ui-selected&quot;)) $(this).addClass(&quot;ui-selected&quot;);
			//console.log(&quot;The value of &#039;this&#039; currently is: &quot;+this);
			console.log(selected);
			offset = $(this).offset();
		},
		drag: function(ev, ui) {
			var dt = ui.position.top - offset.top, dl = ui.position.left - offset.left;
			console.log(ui.position.top,offset.top);
			//console.log(&quot;The value of dt is &quot;+dt);
			
			// take all the elements that are selected expect $(&quot;this&quot;), which is the element being dragged and loop through each.
			selected.not(this).each(function() {
			     // create the variable for we don&#039;t need to keep calling $(&quot;this&quot;)
			     // el = current element we are on
			     // off = what position was this element at when it was selected, before drag
			     var el = $(this), off = el.data(&quot;offset&quot;);
			     el.css({top: off.top + dt, left: off.left + dl});
			});
		}
	});

This is how i could get it running.</description>
		<content:encoded><![CDATA[<p>It was hard to get it work from the code snippets above but thanks for sharing.</p>
<p>	// creates the selected variable<br />
	// we are going to be storing the selected objects in here<br />
	var selected = $([]), offset = {top:0, left:0};<br />
	console.log(&#8221;This is the value of selected when it is created &#8221; +selected + &#8220;&#8221;);</p>
<p>	// initiate the selectable id to be recognized by UI<br />
	$(&#8221;#selectable1&#8243;).selectable({<br />
		filter: &#8216;div&#8217;,<br />
	});</p>
<p>	// declare draggable UI and what we are going to be doing on start<br />
	$(&#8221;#selectable1 div&#8221;).draggable({<br />
	     start: function(ev, ui) {<br />
			selected = $(&#8221;.ui-selected&#8221;).each(function() {<br />
			   var el = $(this);<br />
				el.data(&#8221;offset&#8221;, el.offset());<br />
				//$(this).text(&#8221;Selected and dragging object(s)&#8221;);<br />
		  	});</p>
<p>			if( !$(this).hasClass(&#8221;ui-selected&#8221;)) $(this).addClass(&#8221;ui-selected&#8221;);<br />
			//console.log(&#8221;The value of &#8216;this&#8217; currently is: &#8220;+this);<br />
			console.log(selected);<br />
			offset = $(this).offset();<br />
		},<br />
		drag: function(ev, ui) {<br />
			var dt = ui.position.top &#8211; offset.top, dl = ui.position.left &#8211; offset.left;<br />
			console.log(ui.position.top,offset.top);<br />
			//console.log(&#8221;The value of dt is &#8220;+dt);</p>
<p>			// take all the elements that are selected expect $(&#8221;this&#8221;), which is the element being dragged and loop through each.<br />
			selected.not(this).each(function() {<br />
			     // create the variable for we don&#8217;t need to keep calling $(&#8221;this&#8221;)<br />
			     // el = current element we are on<br />
			     // off = what position was this element at when it was selected, before drag<br />
			     var el = $(this), off = el.data(&#8221;offset&#8221;);<br />
			     el.css({top: off.top + dt, left: off.left + dl});<br />
			});<br />
		}<br />
	});</p>
<p>This is how i could get it running.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
