<?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: Slide Elements in Different Directions</title>
	<atom:link href="http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions</link>
	<description>Tips, techniques, and tutorials for the jQuery JavaScript library</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:50:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-86516</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Sat, 04 Feb 2012 17:55:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-86516</guid>
		<description>Hi Geo,

I think it&#039;s too early to point the finger at anyone (or anything). If you&#039;d like help with this, I&#039;d suggest you create a test case on &lt;a href=&quot;http://jsfiddle.net/&quot; rel=&quot;nofollow&quot;&gt;jsfiddle.net&lt;/a&gt; or &lt;a href=&quot;http://jsbin.com/&quot; rel=&quot;nofollow&quot;&gt;jsbin.com&lt;/a&gt;. And please specify the version of IE in which you&#039;re seeing the problem.</description>
		<content:encoded><![CDATA[<p>Hi Geo,</p>
<p>I think it&#8217;s too early to point the finger at anyone (or anything). If you&#8217;d like help with this, I&#8217;d suggest you create a test case on <a href="http://jsfiddle.net/" rel="nofollow">jsfiddle.net</a> or <a href="http://jsbin.com/" rel="nofollow">jsbin.com</a>. And please specify the version of IE in which you&#8217;re seeing the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geo</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-86515</link>
		<dc:creator>Geo</dc:creator>
		<pubDate>Sat, 04 Feb 2012 17:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-86515</guid>
		<description>I noticed the same problem with Internet Explorer where you have to click the button twice before it executes the function within the click event. Oddly enough this problem doesn&#039;t seem to exist on this web page.., but if I copy and paste the source code into my page, then the problem is there? Does anyone know what it might be? As much as I would like to blame the IE for its shortcumings, I have to say this finger can also be pointed towards the the JQuery, because it was supposed to be cross-browser compatible and there is something they missed in their design.</description>
		<content:encoded><![CDATA[<p>I noticed the same problem with Internet Explorer where you have to click the button twice before it executes the function within the click event. Oddly enough this problem doesn&#8217;t seem to exist on this web page.., but if I copy and paste the source code into my page, then the problem is there? Does anyone know what it might be? As much as I would like to blame the IE for its shortcumings, I have to say this finger can also be pointed towards the the JQuery, because it was supposed to be cross-browser compatible and there is something they missed in their design.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chomachomachoma</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-84714</link>
		<dc:creator>chomachomachoma</dc:creator>
		<pubDate>Fri, 02 Dec 2011 03:02:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-84714</guid>
		<description>I know this is old, but I figured this one out and thought I would post just in case anyone else is looking for the solution here. This is what I did.

Class each button, be it open or close/ Leave the open/toggle as it is, but add another function that will close the &#039;parent&#039; div of where the close button is located, which was originally the &#039;next&#039; element that the first function opened. See the code below for a better idea of what I mean. It may not be the best solution but it works. Hope it helps someone.

&lt;strong&gt;HTML:&lt;/strong&gt;
&lt;pre&gt;&lt;code&gt;&lt;div class=&quot;slidemarginleft slide&quot;&gt;
  slide it
  &lt;div class=&quot;inner&quot;&gt;slide itAnimate this element&#039;s margin-left style property&lt;/div&gt;
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;strong&gt;Jquery:&lt;/strong&gt;
&lt;pre&gt;&lt;code&gt;$(document).ready(function() {

  $(&#039;.slidemarginleft button.open&#039;).click(function() {
    var $marginLefty = $(this).next();
    $marginLefty.animate({
      marginLeft: parseInt($marginLefty.css(&#039;marginLeft&#039;),10) == 0 ?
      $marginLefty.outerWidth() :
      0
    });
  });
  
    $(&#039;.inner button.close&#039;).click(function() {
    var $marginLefty = $(this).parent();
    $marginLefty.animate({
      marginLeft: parseInt($marginLefty.css(&#039;marginLeft&#039;),10) == 0 ?
      $marginLefty.outerWidth() :
      0
    });
  });
  
});&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I know this is old, but I figured this one out and thought I would post just in case anyone else is looking for the solution here. This is what I did.</p>
<p>Class each button, be it open or close/ Leave the open/toggle as it is, but add another function that will close the &#8216;parent&#8217; div of where the close button is located, which was originally the &#8216;next&#8217; element that the first function opened. See the code below for a better idea of what I mean. It may not be the best solution but it works. Hope it helps someone.</p>
<p><strong>HTML:</strong></p>
<pre><code>
<div class="slidemarginleft slide">
  slide it
<div class="inner">slide itAnimate this element's margin-left style property</div>
</div>

</code></pre>
<p><strong>Jquery:</strong></p>
<pre><code>$(document).ready(function() {

  $('.slidemarginleft button.open').click(function() {
    var $marginLefty = $(this).next();
    $marginLefty.animate({
      marginLeft: parseInt($marginLefty.css('marginLeft'),10) == 0 ?
      $marginLefty.outerWidth() :
      0
    });
  });

    $('.inner button.close').click(function() {
    var $marginLefty = $(this).parent();
    $marginLefty.animate({
      marginLeft: parseInt($marginLefty.css('marginLeft'),10) == 0 ?
      $marginLefty.outerWidth() :
      0
    });
  });

});</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riko</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-84361</link>
		<dc:creator>Riko</dc:creator>
		<pubDate>Fri, 02 Sep 2011 14:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-84361</guid>
		<description>Hey Karl, Thanks for the steerage with the slider it works great ! I have a question .. I am a JS newbie so be gentle !!... How would I animate the slider so it is initially open when the page loads then closes itself (without a click) after a few seconds with all other functionality working as normal ? I&#039;ve tried lots of ways to make this happen (on the mentioned dev site submitted as my URL on this form) but no joy .. my face is hurting now. Any additional help would be awesome .. thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hey Karl, Thanks for the steerage with the slider it works great ! I have a question .. I am a JS newbie so be gentle !!&#8230; How would I animate the slider so it is initially open when the page loads then closes itself (without a click) after a few seconds with all other functionality working as normal ? I&#8217;ve tried lots of ways to make this happen (on the mentioned dev site submitted as my URL on this form) but no joy .. my face is hurting now. Any additional help would be awesome .. thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nico</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-84338</link>
		<dc:creator>Nico</dc:creator>
		<pubDate>Mon, 22 Aug 2011 16:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-84338</guid>
		<description>is it possibile to start with hidden div and then animate from left to right?
I have see the examples qith the animation from right to left, how i can invert this?</description>
		<content:encoded><![CDATA[<p>is it possibile to start with hidden div and then animate from left to right?<br />
I have see the examples qith the animation from right to left, how i can invert this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-84308</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 10 Aug 2011 20:42:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-84308</guid>
		<description>Sorry to bother you, but I&#039;m new to jquery and I was wondering how I could select a div that&#039;s not right after the button. Since you use the below code.
&lt;code&gt;var $lefty = $(this).next();&lt;/code&gt;
And I would like to select a div that&#039;s within another div to have that effect.</description>
		<content:encoded><![CDATA[<p>Sorry to bother you, but I&#8217;m new to jquery and I was wondering how I could select a div that&#8217;s not right after the button. Since you use the below code.<br />
<code>var $lefty = $(this).next();</code><br />
And I would like to select a div that&#8217;s within another div to have that effect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jhon</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-84264</link>
		<dc:creator>Jhon</dc:creator>
		<pubDate>Mon, 08 Aug 2011 14:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-84264</guid>
		<description>There is some way to do it from center ? Make one div appear like a point in center and grow fast from there  filling viewport ?</description>
		<content:encoded><![CDATA[<p>There is some way to do it from center ? Make one div appear like a point in center and grow fast from there  filling viewport ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-84263</link>
		<dc:creator>david</dc:creator>
		<pubDate>Mon, 08 Aug 2011 14:15:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-84263</guid>
		<description>Thanks for that, i was having issues with it starting onload.

anyone else having problems with it right to left appearing on load inspect this demo
http://test.learningjquery.com/moreslide.html</description>
		<content:encoded><![CDATA[<p>Thanks for that, i was having issues with it starting onload.</p>
<p>anyone else having problems with it right to left appearing on load inspect this demo<br />
<a href="http://test.learningjquery.com/moreslide.html" rel="nofollow">http://test.learningjquery.com/moreslide.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashin</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-83824</link>
		<dc:creator>Ashin</dc:creator>
		<pubDate>Fri, 15 Jul 2011 10:11:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-83824</guid>
		<description>All These guys are the kings of jquery.. Great to see all of you posting here.. And great tips.. I too will become like u people shortly :)</description>
		<content:encoded><![CDATA[<p>All These guys are the kings of jquery.. Great to see all of you posting here.. And great tips.. I too will become like u people shortly :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Fauver</title>
		<link>http://www.learningjquery.com/2009/02/slide-elements-in-different-directions/comment-page-1#comment-83782</link>
		<dc:creator>Robert Fauver</dc:creator>
		<pubDate>Tue, 28 Jun 2011 17:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=348#comment-83782</guid>
		<description>Thanks much Karl, this post helped me out a bunch! Keep up the good work dude!</description>
		<content:encoded><![CDATA[<p>Thanks much Karl, this post helped me out a bunch! Keep up the good work dude!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 7/21 queries in 0.008 seconds using disk: basic
Object Caching 371/378 objects using disk: basic
Content Delivery Network via learningjquery.kswedberg.netdna-cdn.com

Served from: www.learningjquery.com @ 2012-02-08 17:40:03 -->
