<?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: Quick Tip: Outline Elements on Hover</title>
	<atom:link href="http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover</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: Randy</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-86285</link>
		<dc:creator>Randy</dc:creator>
		<pubDate>Sat, 14 Jan 2012 04:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-86285</guid>
		<description>A little late here, but also &lt;strong&gt;if&lt;/strong&gt; each associated caption was within the .logo classed element, as you are suggesting, then instead of using &lt;code&gt;$.find()&lt;/code&gt; a second argument could be passed to the jQuery core for context:

&lt;pre&gt;&lt;code&gt;$(document).ready(function(){

$(&quot;.logo&quot;).hover(function(){
        $(&#039;.caption&#039;,this).animate({opacity:&quot;show&quot;}, &quot;fast&quot;);
        },
        function(){
        $(&#039;.caption&#039;,this).animate({opacity:&quot;hide&quot;}, &quot;slow&quot;);
    });

});
&lt;/code&gt;&lt;/pre&gt;

If captions were located away from the .logo classed elements within the DOM, then another method could be

&lt;code&gt;$(&#039;.caption&#039;).get($(&#039;.logo&#039;).index(this))&lt;/code&gt;

replacing

&lt;code&gt;$(&#039;.caption&#039;,this)&lt;/code&gt;

Each caption is then mapped to it&#039;s corresponding logo by it&#039;s indexed position within the DOM.

If there is nothing relational between the DOM positioning of logo and caption (one is throwing them randomly into the DOM anywhere), then I would investigate any type of jQuery mapping methods or methods allowing data attachment to elements.  This is beyond my studies of jQuery so far, but anything that could link the logo to it&#039;s caption could be implemented. Including slicing of  id attribute values, which the original poster was wanting to avoid.</description>
		<content:encoded><![CDATA[<p>A little late here, but also <strong>if</strong> each associated caption was within the .logo classed element, as you are suggesting, then instead of using <code>$.find()</code> a second argument could be passed to the jQuery core for context:</p>
<pre><code>$(document).ready(function(){

$(".logo").hover(function(){
        $('.caption',this).animate({opacity:"show"}, "fast");
        },
        function(){
        $('.caption',this).animate({opacity:"hide"}, "slow");
    });

});
</code></pre>
<p>If captions were located away from the .logo classed elements within the DOM, then another method could be</p>
<p><code>$('.caption').get($('.logo').index(this))</code></p>
<p>replacing</p>
<p><code>$('.caption',this)</code></p>
<p>Each caption is then mapped to it&#8217;s corresponding logo by it&#8217;s indexed position within the DOM.</p>
<p>If there is nothing relational between the DOM positioning of logo and caption (one is throwing them randomly into the DOM anywhere), then I would investigate any type of jQuery mapping methods or methods allowing data attachment to elements.  This is beyond my studies of jQuery so far, but anything that could link the logo to it&#8217;s caption could be implemented. Including slicing of  id attribute values, which the original poster was wanting to avoid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2010-08-31 &#171; andrewskinner.name</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-81791</link>
		<dc:creator>links for 2010-08-31 &#171; andrewskinner.name</dc:creator>
		<pubDate>Wed, 01 Sep 2010 00:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-81791</guid>
		<description>[...] Quick Tip: Outline Elements on Hover » Learning jQuery &#8211; Tips, Techniques, Tutorials (tags: hover outline jquery howto dom) [...]</description>
		<content:encoded><![CDATA[<p>[...] Quick Tip: Outline Elements on Hover » Learning jQuery &#8211; Tips, Techniques, Tutorials (tags: hover outline jquery howto dom) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amos</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-79975</link>
		<dc:creator>Amos</dc:creator>
		<pubDate>Wed, 07 Apr 2010 04:51:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-79975</guid>
		<description>The click event in JQ could be replaced with :active selector in CSS, so you dont need JS at all. I don&#039;t see the need of JS or JQ unless you want to add some fancy effects..</description>
		<content:encoded><![CDATA[<p>The click event in JQ could be replaced with :active selector in CSS, so you dont need JS at all. I don&#8217;t see the need of JS or JQ unless you want to add some fancy effects..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2010-02-15- This &#39;N That</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-79710</link>
		<dc:creator>links for 2010-02-15- This &#39;N That</dc:creator>
		<pubDate>Tue, 16 Feb 2010 00:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-79710</guid>
		<description>[...] Quick Tip: Outline Elements on Hover (tags: tutorial javascript jquery css)    February 16th, 2010 &#124; Posted in Reading   &#171; links for 2010-01-28 [...]</description>
		<content:encoded><![CDATA[<p>[...] Quick Tip: Outline Elements on Hover (tags: tutorial javascript jquery css)    February 16th, 2010 | Posted in Reading   &laquo; links for 2010-01-28 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lacey</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-79681</link>
		<dc:creator>Lacey</dc:creator>
		<pubDate>Mon, 08 Feb 2010 16:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-79681</guid>
		<description>Hi, Would it be possible to use what you&#039;ve done here and then also let the user change the colour of the element they select from a widget? kinda like what firebug does but more permanent. Ive been trying to find a example but no luck can you help please :( 

thankyou</description>
		<content:encoded><![CDATA[<p>Hi, Would it be possible to use what you&#8217;ve done here and then also let the user change the colour of the element they select from a widget? kinda like what firebug does but more permanent. Ive been trying to find a example but no luck can you help please :( </p>
<p>thankyou</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fre</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-79665</link>
		<dc:creator>Fre</dc:creator>
		<pubDate>Wed, 03 Feb 2010 12:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-79665</guid>
		<description>I don&#039;t really see the necessity of JQuery for the most part this example? This could just as easily be accomplished using only CSS and the :hover selector (which doesn&#039;t work in IE6, but since outline doesn&#039;t work either it wouldn&#039;t really matter).

&lt;pre&gt;&lt;code&gt;.entrytext *:hover {
       outline: 1px solid #c00;
}&lt;/code&gt;&lt;/pre&gt;

The clicked outline would still have to be added with JQuery of course.

And this could be useful in an online code editor, where you want to show the user where an element starts/ends to find bugs more easily. It&#039;s basically the same way CSSEdit2 on Mac works.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t really see the necessity of JQuery for the most part this example? This could just as easily be accomplished using only CSS and the :hover selector (which doesn&#8217;t work in IE6, but since outline doesn&#8217;t work either it wouldn&#8217;t really matter).</p>
<pre><code>.entrytext *:hover {
       outline: 1px solid #c00;
}</code></pre>
<p>The clicked outline would still have to be added with JQuery of course.</p>
<p>And this could be useful in an online code editor, where you want to show the user where an element starts/ends to find bugs more easily. It&#8217;s basically the same way CSSEdit2 on Mac works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-79427</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 23 Dec 2009 14:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-79427</guid>
		<description>What you did here can better be done with CSS and this might even work for those who diabled JS.</description>
		<content:encoded><![CDATA[<p>What you did here can better be done with CSS and this might even work for those who diabled JS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: discount web design</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-78512</link>
		<dc:creator>discount web design</dc:creator>
		<pubDate>Thu, 03 Sep 2009 07:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-78512</guid>
		<description>Thanks for such excellent post. Really informative blog. Keep the good work here and i wish you all the best and success.</description>
		<content:encoded><![CDATA[<p>Thanks for such excellent post. Really informative blog. Keep the good work here and i wish you all the best and success.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jyoseph</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-78130</link>
		<dc:creator>jyoseph</dc:creator>
		<pubDate>Fri, 14 Aug 2009 04:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-78130</guid>
		<description>I love seeing the progression, how you wrote that first piece of code, slept on it, trimmed it down. Gave it some time, trimmed it down some more. As you said it&#039;s not that the final code you produced is the &quot;best&quot; (depends on the application), but seeing the progression of how you were able to keep fine tuning the code is awesome.</description>
		<content:encoded><![CDATA[<p>I love seeing the progression, how you wrote that first piece of code, slept on it, trimmed it down. Gave it some time, trimmed it down some more. As you said it&#8217;s not that the final code you produced is the &#8220;best&#8221; (depends on the application), but seeing the progression of how you were able to keep fine tuning the code is awesome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.learningjquery.com/2009/06/quick-tip-outline-elements-on-hover/comment-page-1#comment-78098</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Mon, 10 Aug 2009 06:08:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=780#comment-78098</guid>
		<description>Simply amazing. 

Thanks for the article.

&lt;b&gt;Pretty neat :&lt;/b&gt;

&lt;code&gt;
   1.
      $(document).ready(function() {
   2.
        $(&#039;.entrytext&#039;)
   3.
        .bind(&#039;mouseover mouseout&#039;, function(event) {
   4.
          var $tgt = $(event.target);
   5.
          if (!$tgt.closest(&#039;.syntax_hilite&#039;).length) {
   6.
            $tgt.toggleClass(&#039;outline-element&#039;);
   7.
          }
   8.
        })
   9.
        .click(function(event) {
  10.
          $(event.target).toggleClass(&#039;outline-element-clicked&#039;);
  11.
        });
  12.
      });

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Simply amazing. </p>
<p>Thanks for the article.</p>
<p><b>Pretty neat :</b></p>
<p><code><br />
   1.<br />
      $(document).ready(function() {<br />
   2.<br />
        $('.entrytext')<br />
   3.<br />
        .bind('mouseover mouseout', function(event) {<br />
   4.<br />
          var $tgt = $(event.target);<br />
   5.<br />
          if (!$tgt.closest('.syntax_hilite').length) {<br />
   6.<br />
            $tgt.toggleClass('outline-element');<br />
   7.<br />
          }<br />
   8.<br />
        })<br />
   9.<br />
        .click(function(event) {<br />
  10.<br />
          $(event.target).toggleClass('outline-element-clicked');<br />
  11.<br />
        });<br />
  12.<br />
      });</p>
<p></code></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.006 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:33:20 -->
