<?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: Fancy Drop Cap &#8211; Part 2</title>
	<atom:link href="http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2</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: Karthic</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-80288</link>
		<dc:creator>Karthic</dc:creator>
		<pubDate>Tue, 11 May 2010 21:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-80288</guid>
		<description>Hi Karl,
       I am using this fancy letter on my aspx page. I am unable to get the code to wrap the first letter of all the paragraph inside the div..I saw the demo of the new jquery Fancy Letter Plugin but still i wasn&#039;t able to implement it. 
i am using the below code. I am using your alphabets folder container the images of all the letters. I am able to get the image for the first letter of the first paragraph but i need that for all the paragraph in the div.
     I know the jquery fancy letter plugin wraps all the first letter of paragraph in span tag but i am not able to implement that. Can you send me the sample page using the fancy letter plugin?

&lt;pre&gt;
&lt;code&gt;

$(document).ready(function(){
  swap_letter();  

    
});

function swap_letter() {
  var first_paragraph = $(&#039;#content&#039;)[0];
  if (!first_paragraph) return false;
  var node = first_paragraph;
  while (node.childNodes.length) {
    node = node.firstChild;
  }

  var text = node.nodeValue;
  var first_letter = text.substr(0,1);
  var match = /[a-zA-Z]/.test(first_letter);
  if ( match ) {
    node.nodeValue = text.slice(1);
    $(&#039;&lt;img /&gt;&#039;)
        .attr(&#039;src&#039;,&#039;images/alphabet/&#039; + first_letter.toLowerCase() + &#039;.gif&#039;)
        .attr(&#039;alt&#039;,first_letter)
        .addClass(&#039;fancy-letter&#039;)
        .prependTo( first_paragraph ); 
  }
}

&lt;/code&gt;


&lt;code&gt;
img.fancy-letter {

  margin: 2px 2px 2px 0;
}

&lt;/code&gt;

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Karl,<br />
       I am using this fancy letter on my aspx page. I am unable to get the code to wrap the first letter of all the paragraph inside the div..I saw the demo of the new jquery Fancy Letter Plugin but still i wasn&#8217;t able to implement it.<br />
i am using the below code. I am using your alphabets folder container the images of all the letters. I am able to get the image for the first letter of the first paragraph but i need that for all the paragraph in the div.<br />
     I know the jquery fancy letter plugin wraps all the first letter of paragraph in span tag but i am not able to implement that. Can you send me the sample page using the fancy letter plugin?</p>
<pre>
<code>

$(document).ready(function(){
  swap_letter();  

});

function swap_letter() {
  var first_paragraph = $('#content')[0];
  if (!first_paragraph) return false;
  var node = first_paragraph;
  while (node.childNodes.length) {
    node = node.firstChild;
  }

  var text = node.nodeValue;
  var first_letter = text.substr(0,1);
  var match = /[a-zA-Z]/.test(first_letter);
  if ( match ) {
    node.nodeValue = text.slice(1);
    $('<img />')
        .attr('src','images/alphabet/' + first_letter.toLowerCase() + '.gif')
        .attr('alt',first_letter)
        .addClass('fancy-letter')
        .prependTo( first_paragraph );
  }
}

</code>

<code>
img.fancy-letter {

  margin: 2px 2px 2px 0;
}

</code>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6 Useful Coding Solutions For Designers And Developers - Smashing Magazine</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-79201</link>
		<dc:creator>6 Useful Coding Solutions For Designers And Developers - Smashing Magazine</dc:creator>
		<pubDate>Mon, 23 Nov 2009 12:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-79201</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: molokoloco</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-79048</link>
		<dc:creator>molokoloco</dc:creator>
		<pubDate>Wed, 14 Oct 2009 23:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-79048</guid>
		<description>&lt;code&gt;Hi,

Today this is not work for me in FF3.5...
When i manipulate DOM, css don&#039;t apply..
&lt;pre&gt;&lt;code&gt;
&lt;style&gt;
p:first-letter 
{
color:#ff0000;
font-size:xx-large;
}
&lt;/style&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code>Hi,</p>
<p>Today this is not work for me in FF3.5...<br />
When i manipulate DOM, css don't apply..</p>
<pre><code>
&lt;style&gt;
p:first-letter
{
color:#ff0000;
font-size:xx-large;
}
&lt;/style&gt;
</code></pre>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-63312</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Mon, 20 Oct 2008 00:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-63312</guid>
		<description>Hi Dan,
Nope, no reason at all. &lt;code&gt;charAt&lt;/code&gt; will work just as well. Probably a better choice.</description>
		<content:encoded><![CDATA[<p>Hi Dan,<br />
Nope, no reason at all. <code>charAt</code> will work just as well. Probably a better choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Phillimore</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-63285</link>
		<dc:creator>Dan Phillimore</dc:creator>
		<pubDate>Wed, 15 Oct 2008 21:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-63285</guid>
		<description>Is there any particular reason why Line 13:
&lt;code&gt;var first_letter = text.substr(0,1);&lt;/code&gt;
Is not: 
&lt;code&gt;var first_letter = text.charAt(0);&lt;/code&gt;
? Just wondering. Cheers</description>
		<content:encoded><![CDATA[<p>Is there any particular reason why Line 13:<br />
<code>var first_letter = text.substr(0,1);</code><br />
Is not:<br />
<code>var first_letter = text.charAt(0);</code><br />
? Just wondering. Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-61635</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Sat, 04 Oct 2008 13:48:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-61635</guid>
		<description>Hi Kenneth,
I have no idea what&#039;s up. Are you using Firefox with Firebug so you can see what&#039;s happening? Are you getting an error message? Do you have a page you can link to so we can see the problem?</description>
		<content:encoded><![CDATA[<p>Hi Kenneth,<br />
I have no idea what&#8217;s up. Are you using Firefox with Firebug so you can see what&#8217;s happening? Are you getting an error message? Do you have a page you can link to so we can see the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenneth</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-61487</link>
		<dc:creator>Kenneth</dc:creator>
		<pubDate>Sat, 04 Oct 2008 03:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-61487</guid>
		<description>I for the life of me cannot seem to get this script to work... I don&#039;t know what I am doing wrong. I have Jquery and your script in place. I have your alphabet files and still... nuthin. What&#039;s up??</description>
		<content:encoded><![CDATA[<p>I for the life of me cannot seem to get this script to work&#8230; I don&#8217;t know what I am doing wrong. I have Jquery and your script in place. I have your alphabet files and still&#8230; nuthin. What&#8217;s up??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-54480</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Tue, 02 Sep 2008 20:37:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-54480</guid>
		<description>Nick, the issue that Wojciech and Craig were referring to was accessibility when JS is &lt;em&gt;enabled&lt;/em&gt;, not graceful degradation. Screen readers that take JS into account would read out the image&#039;s alt attribute and then &quot;hat&#039;s all there is to it.&quot;</description>
		<content:encoded><![CDATA[<p>Nick, the issue that Wojciech and Craig were referring to was accessibility when JS is <em>enabled</em>, not graceful degradation. Screen readers that take JS into account would read out the image&#8217;s alt attribute and then &#8220;hat&#8217;s all there is to it.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-54475</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 02 Sep 2008 20:20:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-54475</guid>
		<description>Wouldn&#039;t the source just show:

&lt;code&gt;&lt;p&gt;&lt;strong&gt;That&#039;s all there is to it!&amp;lt/strong&gt;&lt;/code&gt;

because jquery is applied on the fly? Then if javascript was disabled, it would just show up as a letter formatted like the rest of the paragraph. Seems like the span wouldn&#039;t be necessary.</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t the source just show:</p>
<p><code>&lt;p&gt;&lt;strong&gt;That's all there is to it!&amp;lt/strong&gt;</code></p>
<p>because jquery is applied on the fly? Then if javascript was disabled, it would just show up as a letter formatted like the rest of the paragraph. Seems like the span wouldn&#8217;t be necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2/comment-page-1#comment-47464</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Sat, 17 May 2008 13:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2006/10/fancy-drop-cap-part-2#comment-47464</guid>
		<description>Thank you Karl!!!</description>
		<content:encoded><![CDATA[<p>Thank you Karl!!!</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 6/18 queries in 0.005 seconds using disk: basic
Object Caching 372/372 objects using disk: basic
Content Delivery Network via learningjquery.kswedberg.netdna-cdn.com

Served from: www.learningjquery.com @ 2012-02-08 14:07:36 -->
