<?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: The Shadower &#8211; Realistic Drop Shadows in Javascript</title>
	<atom:link href="http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/</link>
	<description>Thoughts and photos from an American living in Spain.</description>
	<lastBuildDate>Fri, 10 Feb 2012 07:32:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: lastadm</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-5592</link>
		<dc:creator>lastadm</dc:creator>
		<pubDate>Thu, 03 Feb 2011 07:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-5592</guid>
		<description>The are changes in prototype 1.7 - Position.positionedOffset now returns correct (?) offset, including element margins.

So shadower code have to be changed like this:
replace line 61:
 var offsets = Position.positionedOffset(element);
with 
 var layout = new Element.Layout(element);

and then lines 67-68  change like this
 shadow.style.top = Math.ceil(layout.get(&#039;top&#039;) + layout.get(&#039;margin-top&#039;) + topOffset + i + (legendHeight / 2)) + &#039;px&#039;;
 shadow.style.left = (layout.get(&#039;left&#039;) + layout.get(&#039;margin-left&#039;) + leftOffset + i) + &#039;px&#039;;</description>
		<content:encoded><![CDATA[<p>The are changes in prototype 1.7 &#8211; Position.positionedOffset now returns correct (?) offset, including element margins.</p>
<p>So shadower code have to be changed like this:<br />
replace line 61:<br />
 var offsets = Position.positionedOffset(element);<br />
with<br />
 var layout = new Element.Layout(element);</p>
<p>and then lines 67-68  change like this<br />
 shadow.style.top = Math.ceil(layout.get(&#8216;top&#8217;) + layout.get(&#8216;margin-top&#8217;) + topOffset + i + (legendHeight / 2)) + &#8216;px&#8217;;<br />
 shadow.style.left = (layout.get(&#8216;left&#8217;) + layout.get(&#8216;margin-left&#8217;) + leftOffset + i) + &#8216;px&#8217;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-584</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Wed, 28 Apr 2010 21:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-584</guid>
		<description>I implemented the shadow on my header div and now it is being pushed down just a small amount from the top of the page.

Why is this happening / How can I fix it?</description>
		<content:encoded><![CDATA[<p>I implemented the shadow on my header div and now it is being pushed down just a small amount from the top of the page.</p>
<p>Why is this happening / How can I fix it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zmove</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-583</link>
		<dc:creator>zmove</dc:creator>
		<pubDate>Thu, 11 Mar 2010 16:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-583</guid>
		<description>Hello,

Pretty cool shadow, but it would be cool to be able to set a shadow of 180° that can make shadow in the left and right of the container. In the example, it just make a shadow in the bottom which is no reallistic.

zmove</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Pretty cool shadow, but it would be cool to be able to set a shadow of 180° that can make shadow in the left and right of the container. In the example, it just make a shadow in the bottom which is no reallistic.</p>
<p>zmove</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex_T</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-582</link>
		<dc:creator>Alex_T</dc:creator>
		<pubDate>Sat, 04 Apr 2009 20:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-582</guid>
		<description>Ok, it appears to be a prototype.js bug.

For those who are concerned, here is a possible solution. In order to apply it, modifications to prototype.js are in order.

http://dev.rubyonrails.org/ticket/11473</description>
		<content:encoded><![CDATA[<p>Ok, it appears to be a prototype.js bug.</p>
<p>For those who are concerned, here is a possible solution. In order to apply it, modifications to prototype.js are in order.</p>
<p><a href="http://dev.rubyonrails.org/ticket/11473" rel="nofollow">http://dev.rubyonrails.org/ticket/11473</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex_T</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-581</link>
		<dc:creator>Alex_T</dc:creator>
		<pubDate>Sat, 04 Apr 2009 17:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-581</guid>
		<description>To expand on ravi&#039;s post. This error occurs in IE6 and IE7 (didn&#039;t try it in IE8 though) when applying a drop-shadow to an image. These browsers report &quot;&#039;style&#039; is null or not an object&quot; in prototype.js, when the following line in shadower.js makes a call to it:

Position.clone(placeHolder, element);

Moreover, the image is doubled and placed on top of the original.

The error is specific to a case, when the image has a position:static property. I haven&#039;t found a workaround for this yet. This is very sad, because in every other browser that I used for testing (FF2.0/Opera9/Chrome/Safari) your script works perfectly.</description>
		<content:encoded><![CDATA[<p>To expand on ravi&#8217;s post. This error occurs in IE6 and IE7 (didn&#8217;t try it in IE8 though) when applying a drop-shadow to an image. These browsers report &#8220;&#8216;style&#8217; is null or not an object&#8221; in prototype.js, when the following line in shadower.js makes a call to it:</p>
<p>Position.clone(placeHolder, element);</p>
<p>Moreover, the image is doubled and placed on top of the original.</p>
<p>The error is specific to a case, when the image has a position:static property. I haven&#8217;t found a workaround for this yet. This is very sad, because in every other browser that I used for testing (FF2.0/Opera9/Chrome/Safari) your script works perfectly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-580</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 26 Feb 2009 09:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-580</guid>
		<description>Hi, the script is excellent, but there is a little bug. If the element to be shadowed is more than half the height of the site, the site gets a vertical scrollbar when applying the function &quot;parent.insertBefore&quot; (shadower.js line 29). When the placeHolder is set to &quot;visible=hidden&quot; the scrollbar disappears, but the element stays at the left-position it had when the scrollbar was visible; the correct position of the element  would be (element.left + 16px),
for the scrollbars width is 16 px.

Is there any solution for this problem?
(Sorry for my bad english)</description>
		<content:encoded><![CDATA[<p>Hi, the script is excellent, but there is a little bug. If the element to be shadowed is more than half the height of the site, the site gets a vertical scrollbar when applying the function &#8220;parent.insertBefore&#8221; (shadower.js line 29). When the placeHolder is set to &#8220;visible=hidden&#8221; the scrollbar disappears, but the element stays at the left-position it had when the scrollbar was visible; the correct position of the element  would be (element.left + 16px),<br />
for the scrollbars width is 16 px.</p>
<p>Is there any solution for this problem?<br />
(Sorry for my bad english)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Snyder</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-579</link>
		<dc:creator>Philip Snyder</dc:creator>
		<pubDate>Wed, 10 Dec 2008 22:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-579</guid>
		<description>I got rid of the recursive calls &amp; prototype&#039;s extra overhead for you. :) Sorry if it doesn&#039;t display nicely spaced -- can&#039;t figure it out on this forum. ??

&lt;code&gt;
    function stripIds(node) {
        var stack = new Array;
        stack[stack.length] = node;
        while (stack.length &gt; 0) {
            var n = stack.shift();
            if (node.nodeType == Node.ELEMENT_NODE) {
                if (n.id) {
                    n.removeAttribute(&#039;id&#039;);
                }
                if (n.hasChildNodes()) {
                    var children = n.childNodes;
                    for (var i=0; i&lt;children.length; i++) {
                        stack.push(children[i]);
                    }
                }
            }
        }
        return node;
    }
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I got rid of the recursive calls &amp; prototype&#8217;s extra overhead for you. <img src='http://erikras.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Sorry if it doesn&#8217;t display nicely spaced &#8212; can&#8217;t figure it out on this forum. ??</p>
<p><code><br />
    function stripIds(node) {<br />
        var stack = new Array;<br />
        stack[stack.length] = node;<br />
        while (stack.length &gt; 0) {<br />
            var n = stack.shift();<br />
            if (node.nodeType == Node.ELEMENT_NODE) {<br />
                if (n.id) {<br />
                    n.removeAttribute('id');<br />
                }<br />
                if (n.hasChildNodes()) {<br />
                    var children = n.childNodes;<br />
                    for (var i=0; i&lt;children.length; i++) {<br />
                        stack.push(children[i]);<br />
                    }<br />
                }<br />
            }<br />
        }<br />
        return node;<br />
    }<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sparsh</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-578</link>
		<dc:creator>sparsh</dc:creator>
		<pubDate>Wed, 10 Sep 2008 08:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-578</guid>
		<description>hi Eric,

i have used the same code u have given. But getting error like undefined draggable..

have also used

var example3change = function() {
  Shadower.shadow(example3?,{
    opacity:0.7,nestedShadows:4
    });
}
new Draggable(example3?, { change: example3change });</description>
		<content:encoded><![CDATA[<p>hi Eric,</p>
<p>i have used the same code u have given. But getting error like undefined draggable..</p>
<p>have also used</p>
<p>var example3change = function() {<br />
  Shadower.shadow(example3?,{<br />
    opacity:0.7,nestedShadows:4<br />
    });<br />
}<br />
new Draggable(example3?, { change: example3change });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik R.</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-577</link>
		<dc:creator>Erik R.</dc:creator>
		<pubDate>Tue, 02 Sep 2008 08:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-577</guid>
		<description>Sparsh, that&#039;s because you have to call shadow() again when your div is dragged.  See the third example above:

&lt;code&gt;var example3change = function() {&lt;br /&gt; &#160;&#160;Shadower.shadow(&#039;example3&#039;,{&lt;br /&gt;&#160;&#160;&#160;&#160;opacity:0.7,nestedShadows:4&lt;br /&gt;&#160;&#160;&#160;&#160;});&lt;br /&gt;}&lt;br /&gt;
new Draggable(&#039;example3&#039;, { change: example3change });&lt;/code&gt;That way shadow() is called every time the Draggable &quot;change&quot; event fires.</description>
		<content:encoded><![CDATA[<p>Sparsh, that&#8217;s because you have to call shadow() again when your div is dragged.  See the third example above:</p>
<p><code>var example3change = function() {<br /> &nbsp;&nbsp;Shadower.shadow('example3',{<br />&nbsp;&nbsp;&nbsp;&nbsp;opacity:0.7,nestedShadows:4<br />&nbsp;&nbsp;&nbsp;&nbsp;});<br />}<br />
new Draggable('example3', { change: example3change });</code>That way shadow() is called every time the Draggable &#8220;change&#8221; event fires.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sparsh</title>
		<link>http://erikras.com/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-576</link>
		<dc:creator>sparsh</dc:creator>
		<pubDate>Tue, 02 Sep 2008 06:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2006/12/04/the-shadower-realistic-drop-shadows-in-javascript/#comment-576</guid>
		<description>Nice idea, Erik!
used it and div luks fine but i need to make dat div movable with shadow which i can&#039;t.. only main div moves with my js script. please guide me.</description>
		<content:encoded><![CDATA[<p>Nice idea, Erik!<br />
used it and div luks fine but i need to make dat div movable with shadow which i can&#8217;t.. only main div moves with my js script. please guide me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

