<?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/"
	>

<channel>
	<title>iSynergy Webdesign Blog &#187; jQuery &#8211; iSynergy Webdesign Blog</title>
	<atom:link href="http://www.isynergywebdesign.com/blog/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.isynergywebdesign.com/blog</link>
	<description>The Official iSynergy Webdesign Blog</description>
	<lastBuildDate>Tue, 18 Jan 2011 17:50:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google&#8217;s Instant Preview and How it Affects Web Design</title>
		<link>http://www.isynergywebdesign.com/blog/web-design/news/googles-instant-preview-and-how-it-affects-web-design/</link>
		<comments>http://www.isynergywebdesign.com/blog/web-design/news/googles-instant-preview-and-how-it-affects-web-design/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 17:00:45 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[adobe flash]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[instant preview]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.isynergywebdesign.com/blog/?p=151</guid>
		<description><![CDATA[Google recently rolled out a new feature for search in an attempt to make the process faster and more satisfying. This new feature is an Instant Preview option. Essentially, it shows a visual preview of each of the results on the right hand side of the browser when you activate the option and mouse-over each [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Google recently rolled out a new feature for search in an attempt to make the process faster and more satisfying. This new feature is an <a href="http://googlewebmastercentral.blogspot.com/2010/11/instant-previews.html">Instant Preview</a> option. Essentially, it shows a visual preview of each of the results on the right hand side of the browser when you activate the option and mouse-over each result. While the impact on how this will affect PPC and SEO remains to be seen, there is a clear evident impact to web design that is apparent immediately.</p>
<p><span id="more-151"></span></p>
<p>The question is how does Instant Preview affect web design? It does in how you can present your website/web design in a manner that makes full use of Instant Preview. These are some of the things to consider for Instant Preview when designing a website:</p>
<blockquote>
<h3>Flash</h3>
<p>Although Google says they are working on it, the current Instant Preview does not properly display flash objects.  Instead of displaying the flash, it replaces it with a puzzle piece icon. This wouldn&#8217;t be much of a problem if you used flash sparingly as a complementary element to a design, but if your site is designed completely in flash, it will show up as a page with a puzzle piece icon on it and nothing else. There are some ways around this, of course.</p>
<p>The best way is probably to use javascript to embed the flash object, such as <a href="http://code.google.com/p/swfobject/">swfobject</a>. It validates for W3C and it allows for graceful degradation. swfobject allows you to create an alternate display for the flash object if flash isn&#8217;t available and this is the part that is essential for Instant Preview. Whatever content you place within the alternate display will show up in Instant Preview. As such, you could show an image of what that flash object would look like and it will show as such in Instant Preview.</p>
<h3>HTML5</h3>
<p>HTML5 is all the rage thanks to Apple&#8217;s ongoing fight with Adobe, but it hasn&#8217;t been finalized by W3C and isn&#8217;t fully supported by all the main browsers. While HTML5 can perform some amazing tricks, sadly, most of it does not show up in Instant Preview. Anything done in HTML5 (canvas, etc…) doesn&#8217;t even get replaced by any sort of puzzle icon like for Flash but rather just shows up as blank space in the preview. So if your page is made up entirely of HTML5 content, the page will just appear to be blank in Instant Preview.</p>
<h3>jQuery</h3>
<p>Here&#8217;s some actual good news. Page elements and objects that utilize jQuery appear to show up in Instant Preview just fine. We&#8217;ve checked image cycling and jQuery-based navigation menus and they seem to be fine. So it seems to be fairly safe to utilize this web designer/developer tool.</p>
</blockquote>
<p>Of course Google Instant Preview is still fairly new for wide-spread usage and Google is making innovations to it all the time, but for the moment, the verdict for designing for it is fairly in sync with designing for SEO. Mainly, use Flash sparingly, jQuery is great, and HTML5 is still a work in progress.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.isynergywebdesign.com/blog/web-design/news/googles-instant-preview-and-how-it-affects-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Tutorial: Rotating CSS using setInterval</title>
		<link>http://www.isynergywebdesign.com/blog/web-design/tutorials/jquery-tutorial-rotating-css-using-setinterval/</link>
		<comments>http://www.isynergywebdesign.com/blog/web-design/tutorials/jquery-tutorial-rotating-css-using-setinterval/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 18:54:09 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.isynergywebdesign.com/blog/?p=119</guid>
		<description><![CDATA[jQuery is essentially a web designer’s dream. It’s a javascript library that makes it easy to write javascript code for web designers (at least that’s the way I see it). It’s built to be similar in structure to the way cascading stylesheets (CSS) are written. We here at iSynergy Webdesign use jQuery quite often to [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://jquery.com/">jQuery</a> is essentially a web designer’s dream. It’s a javascript library that makes it easy to write javascript code for web designers (at least that’s the way I see it). It’s built to be similar in structure to the way cascading stylesheets (CSS) are written. We here at iSynergy Webdesign use jQuery quite often to do many scripting events and effects.</p>
<p>What we’ll be doing today is setting an auto rotating CSS that swaps out after a certain amount of time. This effect can be used for a variety of things, such as changing the background along with some text styles.</p>
<p>See an example of the <a href="http://www.isynergywebdesign.com/test/rotatingcss/">jQuery rotating CSS using setInterval</a>.</p>
<p><span id="more-119"></span></p>
<p>In this example, we’ll be rotating 3 CSS files (style1.css, style2.css, and style3.css). To start off, we’ll need to set our first CSS onload.</p>
<pre><code>&lt;link href="styles/style1.css" rel="stylesheet" id="stylesheet" /&gt;</code></pre>
<p>For the above code, please note that I added an id attribute. This is important because this will be the anchor reference for what we’ll be doing in a little bit.</p>
<p>Now, within the header still, but after the call of the jQuery library script (see <a href="http://docs.jquery.com/How_jQuery_Works">How jQuery Works</a>), we’ll start our script.</p>
<pre><code>var interval
$(document).ready(function() {
	var r = Math.floor(Math.random()*3+1);
	$("#stylesheet").attr({href : "styles/style"+r+".css"});
	interval = setInterval("getCSS()", 5000);// 5 secs between requests
});
var currentStyle = $("#stylesheet").attr("href");</code></pre>
<p>First we want to set a variable for the interval via var interval. This will be used a little bit below to call the function to swap the CSS after a certain amount of time.</p>
<p>After that, we’ll want to set the ready event that waits for the document to load before executing the script:</p>
<pre><code>$(document).ready(function() {

//

});</code></pre>
<p>Within that, the next few lines are where the script truly begins. The first line sets a variable to randomize a number. The count used to randomize can be altered by changing the digit that is represented by 3 within our code. We are using 3 in this case because that’s how many stylesheets we have. Feel free to change that for your personal needs.</p>
<p>The next line references the stylesheet anchor (the id we set earlier) and changes the href attribute to our randomized stylesheet. This way, a different stylesheet can be loaded each time the page is loaded.</p>
<p>The last line within the ready event is our timer. It calls a function, getCSS, every 5 seconds (represented by 5000 milliseconds). The amount of time can be changed by altering the milliseconds. We’ve set it on a short timer so it’s easier to see the effect.</p>
<p>After we close the ready event, we want to store the current stylesheet in a variable, which is represented by the last line. This variable will be used later when we rotate the stylesheet.</p>
<p>Now, we’ll write out our getCSS function, which will do the actual stylesheet rotation.</p>
<pre><code>function getCSS() {
	if (currentStyle == "styles/style1.css") {
		$("#stylesheet").attr({href : "styles/style2.css"});
		currentStyle = "styles/style2.css";
	} else if (currentStyle == "styles/style2.css") {
		currentStyle = $("#stylesheet").attr({href : "styles/style3.css"});
		currentStyle = "styles/style3.css";
	} else {
		currentStyle = $("#stylesheet").attr({href : "styles/style1.css"});
		currentStyle = "styles/style1.css";
	}
}</code></pre>
<p>We’ve added in an if statement so that when we rotate the stylesheet, we won’t rotate in a new stylesheet that is the exact one as the current stylesheet (because then, no change will be visible). So we do a check to see what the currentStyle variable (which stores what the current stylesheet href attribute is) is at the moment. If it is style1.css, then we swap in style2.css. After that, we set the new currentStyle variable to style2.css. Rinse and repeat until we’re done setting all 3 instances. That’s it.</p>
<p>The final script should look like the following (nested within a script tag):</p>
<pre><code>&lt;script type="text/javascript"&gt;
var interval
$(document).ready(function() {
	var r = Math.floor(Math.random()*3+1);
	$("#stylesheet").attr({href : "styles/style"+r+".css"});
	interval = setInterval("getCSS()", 5000);// 5 secs between requests
});
var currentStyle = $("#stylesheet").attr("href");

function getCSS() {
	if (currentStyle == "styles/style1.css") {
		$("#stylesheet").attr({href : "styles/style2.css"});
		currentStyle = "styles/style2.css";
	} else if (currentStyle == "styles/style2.css") {
		currentStyle = $("#stylesheet").attr({href : "styles/style3.css"});
		currentStyle = "styles/style3.css";
	} else {
		currentStyle = $("#stylesheet").attr({href : "styles/style1.css"});
		currentStyle = "styles/style1.css";
	}
}
&lt;/script&gt;</code></pre>
<p>One caveat for IE that is not related to the above script, if you intend on setting a background that spans the entire browser and swapping that background using the above script, you’ll need to add a few lines to your CSS to make sure the swap gets the intended effects. Mainly:</p>
<pre><code>html { height: 100%; overflow: auto; margin: 0 }

body { height: 100%; overflow: auto; margin: 0 }</code></pre>
<p>IE doesn’t seem to understand the dimensions for html and body unless it’s explicitly declared. As such, when the CSS rotation occurs, the effect doesn’t translate to the entire body of the page and only to the parts that have dimensions declared. The above should fix that problem.</p>
<p>Edit 2010/12/01: There seems to be a loading problem on some browsers (notably FireFox) that causes the page to display without any styles when it is rotating to a new CSS file. As such, we can get around this problem by pre-loading the CSS file. One method is detailed here: <a href="http://www.phpied.com/preload-cssjavascript-without-execution/">Preload CSS/JavaScript without execution</a>. We&#8217;ve also updated our test files with the preload script.</p>
<p><a href="http://www.isynergywebdesign.com/test/rotatingcss/rotatingcss.zip">Download jQuery rotating CSS using setInterval</a> (zip containing all example files from above).</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.isynergywebdesign.com/blog/web-design/tutorials/jquery-tutorial-rotating-css-using-setinterval/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

