<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Ovalpixels Blog about Web-Building &#187; Design</title>
	<atom:link href="http://www.ovalpixels.com/blog/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ovalpixels.com/blog</link>
	<description>Tips &#38; Tricks on Web Design and Development</description>
	<lastBuildDate>Fri, 28 Jan 2011 09:17:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTML / CSS basic concepts and principles</title>
		<link>http://www.ovalpixels.com/blog/2011/01/25/html-css-basic-concepts-and-principles/</link>
		<comments>http://www.ovalpixels.com/blog/2011/01/25/html-css-basic-concepts-and-principles/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 21:56:10 +0000</pubDate>
		<dc:creator>vladislav</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.ovalpixels.com/blog/?p=241</guid>
		<description><![CDATA[The CSS box model The CSS box model is a W3C standard that draws the basic principles on which a box is drawn in HTML/CSS. Since every HTML element is actually a box, this principle applies to every element. Basically it states that the screen estate a box takes up is defined by the following [...]]]></description>
			<content:encoded><![CDATA[<h3>The CSS box model</h3>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2010/10/box-model.png" class="thickbox no_icon" rel="gallery-241" title="CSS standard box model"><img class="alignright size-medium wp-image-254" title="CSS standard box model" src="http://www.ovalpixels.com/blog/wp-content/uploads/2010/10/box-model-300x224.png" alt="CSS standard box model" width="300" height="224" /></a>The CSS box model is a <a  href="http://www.w3.org/">W3C standard</a> that draws the basic principles on which a box is drawn in HTML/CSS. Since every HTML element is actually a box, this principle applies to every element. Basically it states that the screen estate a box takes up is defined by the following parameters, in this order from inside to outside:</p>
<ol>
<li>width/height</li>
<li>padding</li>
<li>border</li>
<li>margin</li>
</ol>
<p>Here the content area is defined by width/height.<span id="more-241"></span></p>
<h3>Quirks mode, standards mode and almost standards mode</h3>
<p>All these terms have to do with the issue of browser compatibility. It all started back in the dawn of browsers, where every browser laid down its own flavor of standards and tried to force it just for the sake of “I have a bigger audience and think things should happen my way”.</p>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2010/10/box-model-quirksmode.png" class="thickbox no_icon" rel="gallery-241" title="CSS box model - quirks mode"><img class="alignright size-medium wp-image-255" title="CSS box model - quirks mode" src="http://www.ovalpixels.com/blog/wp-content/uploads/2010/10/box-model-quirksmode-300x224.png" alt="CSS box model - quirks mode" width="300" height="224" /></a>So, the interpretation of CSS box model was different for IE and Netscape (the big players back then). Since these differences became very inconvenient for webdevelopers it was obvious W3C standards (common standards) was the way to go. Still, many websites had already been created using the distorted rules existing so far, and if the browsers began displaying them according to standards many sites would break.</p>
<p>So developers had to be given a way to switch between the <strong>standards mode</strong> and <strong>quirks mode</strong> (the wild west of browsers). In quirks mode (the old way of displaying pages) different bugs are “available for public use”, the most notable difference in the box model being that the box size is defined by width/height, border and margin (no padding &#8211; padding actually is a part of with/height, and the content area is defined by width/height minus padding). This switch is the DOCTYPE definition that should be given in the start of every HTML document, which tells the browsers how to interpret the page &#8211; in standards or in quirks mode.</p>
<p>The “<strong>almost standards mode</strong>” is a hybrid interpretation employed by some browsers. It differs from standards mode only in the interpretation of laying out images in a table (which is in quirks mode), so that old websites using many sliced-up images laied out in a table structure are less likely to break.</p>
<h3>Semantics</h3>
<p>Probably you&#8217;ve heard this a bunch of times &#8211; &#8220;&#8230;using semantic code&#8221;. What does it actually say? Well, this is to say your code should be meaningful by itself. The code is not just there to accomplish the goal of presenting a certain piece of content on the screen in a specific way, but should be universally describing the content. Thus it would be a matter of CSS changes to make the content look in an entirely new way. Also, each content entity will be readable, described by its role &#8211; address, content, header, box, username, etc.</p>
<p>Let&#8217;s give a small example. What&#8217;s wrong with the following piece of code?</p>
<pre>&lt;span class="red"&gt;A message goes here.&lt;/span&gt;</pre>
<p>Technically &#8211; nothing. Semantically, however, the coder binds the class name to a specific website theme/look/skin, instead of keeping the code semantically meaningful. An important rule of web programming is to keep the three layers (action, design, content) separate. It would be better to use a class name like “emphasized”, for example. If we use .red we’re facing two major issues:</p>
<ul>
<li>when changing the site theme at a certain stage of development to one with green elements, for example, the .red class would look weird if it displays as green;</li>
<li>semantically the code is richer when using meaningful class names (like “emphasized”, “date”, “section”), and thus the webpage will be more delicious a bite for search engines.</li>
</ul>
<h3>Classes vs. IDs</h3>
<p>You can assign both attributes to an element, but which one should you use?</p>
<ul>
<li>From a CSS perspective <strong>IDs have higher priority</strong>. So, if you have both a class and an ID assigned to an element, the ID definition will take precedence:</li>
</ul>
<pre>&lt;style&gt;
#header { color:green; }
.myStyle { color:red; }
&lt;/style&gt;
...
&lt;div id="header" class="myStyle"&gt;Lorem Ipsum&lt;/div&gt;</pre>
<p>The text will show as green, despite the fact that .myStyle was defined on a later stage in the CSS.</p>
<ul>
<li>From HTML/JS perspective, you should only use <strong>unique IDs</strong> in a document, so it is appropriate to use IDs for major document elements like #header, #footer, #content, and classes for elements that are found repeating in a document (.box, .column, .emphasized).</li>
</ul>
<h3>The advantages of writing standard-based DIV based HTML</h3>
<p>CSS-based layouts have been around for over 10 years now, so it is a sin not to use them. It has multiple advantages before the table-based layouts, and some of them are:</p>
<ul>
<li>you get everything done with a <strong>smaller amount of code</strong>, thus achieving a better <a  href="http://www.seochat.com/seo-tools/code-to-text-ratio/">code-to-text ratio</a>, which affects SEO ranking, too;</li>
<li>you get <strong>better control over separate elements</strong> (e.g. moving the logo around is much easier and does not require re-slicing the whole site layout); this is much like the ease of editing a layered Photoshop/GIMP file vs. editing a flattened JPG;</li>
<li>you get<strong> better separation of content, design and behaviour</strong>; thus different team members can work separately and independently on different aspects of a site (design, development), without interfering; also, you get a much easier time at debugging issues and making changes;</li>
<li>you get an<strong> easy way to make any design changes</strong> (effectively switch between themes) by not changing a <strong>single line of content code</strong>; all you have to edit is your CSS file;</li>
<li>you get a thing to brag about in front of your friends &#8211; writing compact and standards-compatible code is certainly an accomplishment <img src='http://www.ovalpixels.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>by writing standard code you make sure<strong> your site will work and look properly in a vast amount of browsers</strong> &#8211; even in future browsers, ones that will come out 2 years from now.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ovalpixels.com/blog/2011/01/25/html-css-basic-concepts-and-principles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Non-destructive techniques in Photoshop image manipulation &#8211; part 1</title>
		<link>http://www.ovalpixels.com/blog/2009/03/06/non-destructive-techniques-in-image-manipulation/</link>
		<comments>http://www.ovalpixels.com/blog/2009/03/06/non-destructive-techniques-in-image-manipulation/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 22:14:11 +0000</pubDate>
		<dc:creator>vladislav</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[techniques]]></category>

		<guid isPermaLink="false">http://www.ovalpixels.com/blog/?p=25</guid>
		<description><![CDATA[&#8230;or adding a pinch of parametricity to your photoshop work Intro Imagine the following: you have worked on a Photoshop project, spending hours on end over it. You may not have slept this night, but you know that every drop of sweat was worth it &#8211; after all you have created wonders! The result is [...]]]></description>
			<content:encoded><![CDATA[<h4>&#8230;or adding a pinch of parametricity to your photoshop work</h4>
<h3>Intro</h3>
<p>Imagine the following: you have worked on a Photoshop project, spending hours on end over it. You may not have slept this night, but you know that every drop of sweat was worth it &#8211; after all you have created wonders! The result is quite impressive, and of course when you show it to the customer he is totally into it, and says:</p>
<blockquote><p>&#8220;This is great! I love it! But <strong>what if </strong>we make the image of the little girl a bit bigger?&#8230; Just a bit &#8211; it shouldn&#8217;t be an issue, right?&#8221;</p></blockquote>
<p>OR</p>
<blockquote><p>&#8220;That tree you have cut out from the background&#8230; <strong>Let&#8217;s</strong> get it back and see if it is better&#8221;</p></blockquote>
<p>Well&#8230; Let me hear you say &#8220;Arrghhh!!!&#8221; <span id="more-25"></span></p>
<h3>How transformations change the image irreversibly</h3>
<p>In order to illustrate that, let&#8217;s look at a simple case. We will get a simple image, rotate it 45 degrees, then rotate it back 45 degrees and compare the difference between the original, untransformed image, and the supposed-to-be-the-same, rotated back and forth, image. Here goes the three step process:</p>
<div id="attachment_134" class="wp-caption aligncenter" style="width: 360px"><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2009/03/fig1.png" class="thickbox no_icon" rel="gallery-25" title="Rotating an image 45 degrees and back again"><img class="size-full wp-image-134" src="http://www.ovalpixels.com/blog/wp-content/uploads/2009/03/fig1.png" alt="Rotating an image 45 degrees and back again" width="350" height="696" /></a><p class="wp-caption-text">Rotating an image 45 degrees and back again.</p></div>
<p>As you can see, the image we ended up with is quite far from the one we started with. And this is the result of only two consecutive transformations that require interpolation (scaling/rotation). Quite a bunch of info is lost, since <strong>each transformation is irreversible, and the result serves as a base for any following transformation</strong>.</p>
<p>Going back to the scenario described in the intro: since you have manipulated the original images (rotated them, scaled them down, applied filters and color corrections to them), you cannot just go back, change a little something, and expect all the rest of the manipulations down the line to &#8216;re-apply&#8217; and remain the same.</p>
<p>On the other hand, if you go back in history to the stage you want to change, you will lose all the undone actions. So what you will have to do it basically re-do everything from that moment on.</p>
<p>This is just one example when you would wish your image manipulations are adjustable even <strong>after </strong>they&#8217;ve been done.</p>
<h3>Have no fear &#8211; the solution is here</h3>
<p>Fortunately there is a way to achieve this &#8211; you have a series of tools in your hands that can help you make your actions reversible and adjustable, and the team working on Photoshop, as a leading product on the market, seems to think in the same direction, adding to these features in the latest releases.  Here is a quick list:</p>
<ul>
<li>masks / clipping masks</li>
<li>adjustment layers</li>
<li>smart objects / smart filters</li>
<li>history brush</li>
</ul>
<h3>Masks: don&#8217;t delete &#8211; just hide</h3>
<p>This is a quite basic technique. The idea is to just <strong>hide </strong>portions of the image you don&#8217;t need instead of erasing them. A mask layer is actually a grayscale &#8220;map overlay&#8221;, where white represents complete opaqueness, black &#8211; full transparency, and the shades of grey &#8211; levels of semi-transparency. Boy, does that help out in that &#8220;get-the-tree-back&#8221; situation &#8211; you just need to paint the mask white where the pixels of the hidden tree are and voila &#8211; there it is.</p>
<p>Adding a mask to a layer in Photoshop is just a click away &#8211; select the layer to add the mask to, and then click on the &#8220;Add layer mask&#8221; button in the &#8220;Layers&#8221; palette:</p>
<div id="attachment_136" class="wp-caption aligncenter" style="width: 264px"><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2009/03/add-mask.png" class="thickbox no_icon" rel="gallery-25" title="Adding a mask - select the layer to add the mask to, and then click on the &quot;Add layer mask&quot; button in the &quot;Layers&quot; palette."><img class="size-full wp-image-136" src="http://www.ovalpixels.com/blog/wp-content/uploads/2009/03/add-mask.png" alt="Adding a mask - select the layer to add the mask to, and then click on the &quot;Add layer mask&quot; button in the &quot;Layers&quot; palette." width="254" height="93" /></a><p class="wp-caption-text">Adding a mask</p></div>
<h3>Clipping Masks &#8211; another breed</h3>
<p>Sometimes you need to restrain the visibility of a layer to the extent of a certain object that is on another layer.  Let&#8217;s say you want to achieve this effect:</p>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/clipping-masks-01.png" class="thickbox no_icon" rel="gallery-25" title=""><img class="aligncenter size-full wp-image-43" src="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/clipping-masks-01.png" alt="" width="425" height="59" /></a></p>
<p>This is an image seen through a &#8216;hole&#8217; defined by a text layer. Achieving this through a regular mask on the image layer will do quite the same for you, but there will be two disadvantages:</p>
<ul>
<li>If you want to change the text, you will need to re-create the mask, too.</li>
<li>You will have some redundancy by having an extra element &#8211; both a text layer and a mask.</li>
</ul>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/clipping-masks-02.png" class="thickbox no_icon" rel="gallery-25" title=""><img class="alignright size-full wp-image-44" src="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/clipping-masks-02.png" alt="" width="199" height="97" /></a>Now let&#8217;s see how to get the same result through a clipping mask:</p>
<ol>
<li>Create the text layer.</li>
<li>Drag the image layer over the text layer.</li>
<li>Alt-click (Option-click for Mac) on the border between the two layers to get the text layer act as a clipping mask for the image layer.</li>
</ol>
<p>HINT: You can add as much clipped layers as needed.</p>
<p><strong>Pros: </strong>You get a dynamically updated mask. You simplify things by having a single layer acting both as a layer and a mask for other layers.</p>
<p><strong>Cons: </strong>Setting the opacity of the clipping mask influences the opacity of the clipped layers (<strong>note: </strong>there is no vice versa)</p>
<h3>Adjustment layers: don&#8217;t harm your pixels</h3>
<p><img class="size-full wp-image-32 alignright" src="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/adjustment-layers-01.png" alt="" width="188" height="247" />The most common <strong>image correction</strong> techniques involve tinkering with <strong>brightness/contrast</strong>, <strong>levels</strong>, <strong>hue/saturation</strong>, <strong>curves</strong>, <strong>exposure</strong> or <strong>converting to grayscale</strong>. All these operations change the original image, and in most cases you could <strong>lose information</strong> (like losing color with grayscale conversion, or losing detail in burnt-out areas when brightening an image). So it is a great thing all these (and more) are available as an adjustable alternative &#8211; the so-called &#8216;adjustment layers&#8217;.</p>
<p><strong>Applying an adjustment</strong> is as easy as inserting a new layer (see the screenshot) in the layer stack. Click on the &#8220;Create new fill or adjustment layer&#8221; button in the &#8220;Layers&#8221; palette, and choose an adjustment to apply. The adjustment is then applied to all layers down the stack. If you later want to change the parameters of the adjustment (e.g. the brightness value), just double click on its thumbnail to get the adjustment settings dialogue. You can also move the layer up and down the stack, thus controlling which layers are affected by it. If you don&#8217;t want the adjustment anymore &#8211; you can temporarily hide it or delete it and everything will be as if it never existed.</p>
<blockquote><p>So, an adjustment layer is like an <strong>instruction set</strong> for a change (e.g. &#8216;change the brightness level to +35),  and not the change itself. This <strong>allows us to change the parameters of the adjustment</strong> (in this case &#8211; brightness and contrast levels) anytime. This is why I call it &#8216;parametric&#8217;.</p></blockquote>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/img_0633-gray-focus.jpg" class="thickbox no_icon" rel="gallery-25" title=""><img class="alignright size-medium wp-image-37" src="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/img_0633-gray-focus-300x225.jpg" alt="" width="144" height="108" /></a><strong>Co</strong><strong>nstraining the effect of the adjustment</strong> to a certain portion of the image (like, in the image on the right, graying out the whole image except the flower), is a matter of drawing in the mask of the adjustment layer (see &#8220;<em>Masks</em>&#8220;).</p>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/adjustment-layers-02.png" class="thickbox no_icon" rel="gallery-25" title=""><img class="alignleft size-medium wp-image-38" src="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/adjustment-layers-02-196x300.png" alt="" width="94" height="144" /></a>The tricky part is if you want to <strong>apply an adjustment to a single layer / a group of layers</strong> in the middle of the stack.</p>
<p><strong>Restrain the effect to a group of layers:</strong> Since the adjustment layer affects all layers below, a way to restrain its effect is group the layers with the adjustment layer on top of the the group stack (see left).</p>
<p><a  href="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/adjustment-layers-03.png" class="thickbox no_icon" rel="gallery-25" title=""><img class="alignright size-full wp-image-39" src="http://www.ovalpixels.com/blog/wp-content/uploads/2008/11/adjustment-layers-03.png" alt="" width="213" height="323" /></a>For <strong>restraining the effect to a single layer</strong> you can avoid creating an unnecessary group, but use the layer (Layer 2) as a <a  href="#masksclip">clipping mask</a> for the adjustment layer instead (see right). You can achieve that by Alt-clicking (Option-click for Mac) on the border between the two layers in the layer stack.</p>
<p><strong>Pros: </strong>Transformations are not lossy, because they are undoable and adjustable.</p>
<p><strong>Cons:</strong> None that I know of.</p>
<p>That&#8217;s it for now. The next couple of tools (<em>smart objects/filters</em> and history brush) will be coming up shortly in the &#8220;<em>Non-destructive techniques in Photoshop image manipulation &#8211; part 2</em>&#8221; article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ovalpixels.com/blog/2009/03/06/non-destructive-techniques-in-image-manipulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making fancy websites without Flash 2: Animating background image</title>
		<link>http://www.ovalpixels.com/blog/2009/02/21/making-fancy-websites-without-flash-animating-background-image/</link>
		<comments>http://www.ovalpixels.com/blog/2009/02/21/making-fancy-websites-without-flash-animating-background-image/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 18:48:43 +0000</pubDate>
		<dc:creator>georgi</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.ovalpixels.com/blog/?p=87</guid>
		<description><![CDATA[This is a continuation of the Making fancy website without Flash entry from a few days ago. To make the story short &#8211; I will try and show you some jQuery alernatives for popular Flash animation. We will start with a Smooth background image swap &#8211; jQuery Background-Image Transition Plugin I will show you an [...]]]></description>
			<content:encoded><![CDATA[<p>This is a continuation of the <a  href="http://www.ovalpixels.com/blog/2009/02/20/making-fancy-websites-without-flash-introduction/" target="_blank">Making fancy website without Flash</a> entry from a few days ago. To make the story short &#8211; I will try and show you some jQuery alernatives for popular Flash animation. <span id="more-87"></span>We will start with a</p>
<h3>Smooth background image swap &#8211; jQuery Background-Image Transition Plugin</h3>
<p>I will show you an example right now, so you know what I am talking about.</p>
<p><a  title="background-image-transition-example" href="http://www.ovalpixels.com/bgImageTransition/">Here is a working example</a></p>
<p>What we basically do is:</p>
<ol>
<li>Create an additional hidden &lt;div&gt; element on top ( using z-index ) of the element we want to animate</li>
<li>Load the new image in the in the cache in the background, so that the effect is smooth</li>
<li>Set the new src to the new &lt;div&gt; element</li>
<li>fadeIn() the new &lt;div&gt; element so that it creates the illusion that the background image of our initial div is smoothly changing</li>
<li>Optional step &#8211; if we need to change the image once again, go from 2 to 5 but setting the new src to our <em>initial </em>&lt;div&gt; and then using <em>fadeOut()</em> on the new element, so that it disappears and the new image is set as background to the old &lt;div&gt;. This way we won&#8217;t have an infinitive increase of the z-index and won&#8217;t actually change the z-index of the initial &lt;div&gt;</li>
</ol>
<p>OK, let&#8217;s get to work, we will start with the HTML markup:</p>
<p>&lt;div id=&#8221;backImage&#8221;&gt;&lt;/div&gt;</p>
<p>Well, that was pretty easy: we have a simple &lt;div&gt; element with some demo text and just next to it we add that additional &lt;div&gt; which we will need for the animation.</p>
<p>So, here is the CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#backImage</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> -<span style="color: #cc66cc;">2</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">800px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'path/to/initial/img'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We just set a height and width of the element so that we are sure the image will actually be shown. It is generally a good idea to have the z-index set to a negative number while other elements have a greater z-index value.</p>
<p>We will use <a  href="http://plugins.jquery.com/project/bgImageTransition/" target="_blank">jQuery&#8217;s Background-Image Transition Plugin</a> for our example.</p>
<p>First, add jQuery and the plugin</p>
<p>&lt;script lang=&#8221;Javascript&#8221; src=&#8221;path/to/jQuery.js&#8221; type=&#8221;text/javascript&#8221;&gt; &lt;/script&gt;<br />
&lt;script lang=&#8221;Javascript&#8221; src=&#8221;path/to/jQuery.bgImageTransition.js&#8221; type=&#8221;text/javascript&#8221;&gt; &lt;/script&gt;</p>
<p>Then, at the end of the document, add the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#backImage'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bgImageTransition</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'path/to/new/image'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
        duration<span style="color: #339933;">:</span> <span style="color: #3366CC;">'slow'</span><span style="color: #339933;">,</span>
        easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'linear'</span><span style="color: #339933;">,</span>
        helperElementId<span style="color: #339933;">:</span> <span style="color: #3366CC;">'backImage2'</span><span style="color: #339933;">,</span>
        zindex<span style="color: #339933;">:</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span>
        callback<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
           <span style="color: #006600; font-style: italic;">//do sth</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The only mandatory argument is the path to the new image. The optional second argument is an object holding some tweaks. You can set the desired duration, easing, helperElementId ( which is generated by the plugin ), z-index of the helperElement ( by default it will take the selected element&#8217;s zindex and increment by 1 ) and a callback function in case you want to execute some functionality when the transition is over.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ovalpixels.com/blog/2009/02/21/making-fancy-websites-without-flash-animating-background-image/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>

