<?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>Website Builders Resource &#187; jQuery</title>
	<atom:link href="http://websitebuildersresource.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://websitebuildersresource.com</link>
	<description>Your Web Development Source</description>
	<lastBuildDate>Mon, 25 Jan 2010 21:53:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery AJAX News Ticker</title>
		<link>http://websitebuildersresource.com/2010/01/15/jquery-ajax-news-ticker/</link>
		<comments>http://websitebuildersresource.com/2010/01/15/jquery-ajax-news-ticker/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 23:43:40 +0000</pubDate>
		<dc:creator>builderadmin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://websitebuildersresource.com/?p=806</guid>
		<description><![CDATA[There are several jQuery News Tickers available but I needed one that I could control the output from PHP and add a slight blank delay between news items. This demo does not have the delay between items but you can add sleep() to ticker.php if needed. This script could be modified to create the data source (ticker.php) via MySQL or RSS feeds.]]></description>
			<content:encoded><![CDATA[<p>There are several jQuery News Tickers available but I needed one that I could control the output from PHP and add a slight blank delay between news items. This demo does not have the delay between items but you can add sleep() to ticker.php if needed. This script could be modified to create the data source (ticker.php) via MySQL or RSS feeds.</p>
<p>This script calls ticker.php for the first item to set in the ticker &lt;div&gt; and also set the total count for the javascript to loop through then calls the appropriate indexed item from the $json array in ticker.php.</p>
<p>For the impatient:<br />
<a href="http://websitebuildersresource.com/demos/jquery-ajax-news-ticker/" target="_blank">Demo of the jQuery AJAX News Ticker</a></p>
<h3>PHP: ticker.php</h3>
<pre><code class="php">if ($_GET['r'] == 1)
{
    // Removing browser caching
    header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
    header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
    header( "Cache-Control: no-cache, must-revalidate" );
    header( "Pragma: no-cache" );
}

$json = array();

$json[] = array(
	'url' =&gt; '#1',
	'text' =&gt; 'First Item Text'
);

$json[] = array(
	'url' =&gt; '#2',
	'text' =&gt; 'Second Item Text'
);

$json[] = array(
	'url' =&gt; '#3',
	'text' =&gt; 'Third Item Text'
);

$json[] = array(
	'url' =&gt; '#4',
	'text' =&gt; 'Fourth Item Text'
);

if ($_GET['r'] == 1)
{
    echo json_encode(array($json[((int)$_GET['i'] - 1)]));
}</code></pre>
<h3>jQuery</h3>
<pre><code class="javascript">&lt;?php
// Call the ticker.php script to grab the first item and total items
require('ticker.php');
?&gt;

var total = &lt;?php echo count($json); ?&gt;;
var current = 1;

$(document).ready(function(){
	setInterval("get_ticker()", 3000); // Change this to your specified need time, in milliseconds
});

function get_ticker()
{
	// Increment the counter
	if (current != total)
	{
		current  ;
	}
	else
	{
		current = 1;
	}

	// Get the data
	$.ajax({
		type: "GET",
		dataType: "json",
		cache: false,
		url: "ticker.php?i="   current   "&amp;r=1",
		timeout: 2000,
		error: function() {
			alert("Failed to submit");
		},
		success: function(data) {
			$.each(data, function(i, j){
				$("#ticker-link").attr("href", j.url);
				$("#ticker-link").text(j.text);
			});
		}
	});
}</code></pre>
<h3>HTML</h3>
<pre><code class="html">&lt;div id="ticker"&gt;
	&lt;!-- Display the first item --&gt;
	&lt;a href="&lt;?php echo $json[0]['url']; ?&gt;" id="ticker-link"&gt;&lt;?php echo $json[0]['text']; ?&gt;&lt;/a&gt;
&lt;/div&gt;</code></pre>
<h3>Demo/Download</h3>
<p><a href="http://websitebuildersresource.com/wp-content/uploads/2010/01/jquery-ajax-news-ticker.zip">Download</a><br />
<a href="http://websitebuildersresource.com/demos/jquery-ajax-news-ticker/" target="_blank">Demo of the jQuery AJAX News Ticker</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F&amp;title=jQuery+AJAX+News+Ticker"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F&amp;title=jQuery+AJAX+News+Ticker"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F&amp;title=jQuery+AJAX+News+Ticker"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F&amp;headline=jQuery+AJAX+News+Ticker"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=jQuery+AJAX+News+Ticker&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=jQuery+AJAX+News+Ticker&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=jQuery+AJAX+News+Ticker&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=jQuery+AJAX+News+Ticker&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=jQuery+AJAX+News+Ticker&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F&amp;title=jQuery+AJAX+News+Ticker&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F15%2Fjquery-ajax-news-ticker%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>No Related Post</li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2010/01/15/jquery-ajax-news-ticker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Innerfade with Separate Link Region</title>
		<link>http://websitebuildersresource.com/2010/01/14/jquery-innerfade-with-separate-link-region/</link>
		<comments>http://websitebuildersresource.com/2010/01/14/jquery-innerfade-with-separate-link-region/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 17:37:28 +0000</pubDate>
		<dc:creator>builderadmin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://websitebuildersresource.com/?p=789</guid>
		<description><![CDATA[Was working on a project and the client needed a fading news rotator with a link to each article at the bottom of the news box. The jQuery Innerfade plugin can handle the fading rotation but requires some modification to update another &#60;div&#62; that includes the link from the fading news article.]]></description>
			<content:encoded><![CDATA[<p>Was working on a project and the client needed a fading news rotator with a link to each article at the bottom of the news box. The <a href="http://medienfreunde.com/lab/innerfade/" target="_blank">jQuery Innerfade</a> plugin can handle the fading rotation but requires some modification to update another &lt;div&gt; that includes the link from the fading news article.</p>
<p>Here is demo that might help explain:<br />
<a href="http://websitebuildersresource.com/demos/jquery-innerfade-link-region/jquery-innerfade-link-region.php" target="_blank"> jQuery Innerfade with Separate Link Region Demo</a></p>
<h3>jQuery</h3>
<p>Place this in your &lt;head&gt; section:</p>
<pre><code class="javascript">&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.innerfade.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;
	$(document).ready(function(){
		$('#fade').innerfade({
			speed: 1000,
			timeout: 4000,
			type: 'sequence'
		});
	});
&lt;/script&gt;</code></pre>
<p>To change the HTML elements you need to apply the HREF to open jquery.innerfade.js and go to Line 79-84. You can comment out the debug text.</p>
<pre><code class="javascript">// Set the news link
var this_element = $(elements[current]);
var matches = /&lt;a\s [^&gt;]*href="([^"]*)"[^&gt;]*&gt;(.*)&lt;\/a&gt;/i.exec(this_element.html());
var url = matches[1];
$("a#news-link").attr("href", url);
$("div#news-link-debug").html("Debug Item HREF: " + url);</code></pre>
<h3>HTML</h3>
<pre><code class="html">&lt;ul id="fade"&gt;
	&lt;li&gt;&lt;a href="#1"&gt;Item 1&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#2"&gt;Item 2&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#3"&gt;Item 3&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="#4"&gt;Item 4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div id="news-link"&gt;&lt;a href="#1"&gt;Click Here&lt;/a&gt;&lt;/div&gt;
&lt;div id="news-link-debug"&gt;&lt;/div&gt;</code></pre>
<h3>Demo/Download</h3>
<p><a href="http://websitebuildersresource.com/wp-content/uploads/2010/01/jquery-innerfade-link-region.zip">Download</a><br />
<a href="http://websitebuildersresource.com/demos/jquery-innerfade-link-region/jquery-innerfade-link-region.php" target="_blank">jQuery Innerfade with Separate Link Region Demo</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F&amp;title=jQuery+Innerfade+with+Separate+Link+Region"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F&amp;title=jQuery+Innerfade+with+Separate+Link+Region"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F&amp;title=jQuery+Innerfade+with+Separate+Link+Region"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F&amp;headline=jQuery+Innerfade+with+Separate+Link+Region"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=jQuery+Innerfade+with+Separate+Link+Region&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=jQuery+Innerfade+with+Separate+Link+Region&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=jQuery+Innerfade+with+Separate+Link+Region&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=jQuery+Innerfade+with+Separate+Link+Region&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=jQuery+Innerfade+with+Separate+Link+Region&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F&amp;title=jQuery+Innerfade+with+Separate+Link+Region&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2010%2F01%2F14%2Fjquery-innerfade-with-separate-link-region%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>No Related Post</li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2010/01/14/jquery-innerfade-with-separate-link-region/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My</title>
		<link>http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/</link>
		<comments>http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 18:12:32 +0000</pubDate>
		<dc:creator>Jason Maletsky</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://websitebuildersresource.com/?p=599</guid>
		<description><![CDATA[The following examples cover some of the basics when working with a <select> HTML element. Multiple selects, set multiple selects after post and set the default selected value on page load.]]></description>
			<content:encoded><![CDATA[<p>The following examples cover some of the basics when working with a &lt;select&gt; HTML element.</p>
<h2>Fill multiple selects with JSON data onchange</h2>
<p>This example fills a second (or more) &lt;select&gt; HTML element with data from a JSON request. Useful in those situations where the selection of the previous &lt;select&gt; element determines what needs to go in the next &lt;select&gt; such as car manufacturers, makes, year, models, etc.</p>
<p><a href="http://websitebuildersresource.com/demos/jquery-select-html-manipulation/multiple.php" target="_blank">View Example</a></p>
<h2>Fill multiple selects with JSON data onchange and set the default for secondary &lt;select&gt; on post</h2>
<p>This exmaple is similar to the above but by default the second &lt;select&gt; will lose it&#8217;s selected value after a POST. This example will remedy that problem.</p>
<p><a href="http://websitebuildersresource.com/demos/jquery-select-html-manipulation/multiple-post.php" target="_blank">View Example</a></p>
<h2>Set the default selected value for a &lt;select&gt; HTML element onload</h2>
<p>This example will show how to set the default selected value on page load.</p>
<p><a href="http://websitebuildersresource.com/demos/jquery-select-html-manipulation/default.php" target="_blank">View Example</a></p>
<h2>Download</h2>
<p><a href="http://websitebuildersresource.com/wp-content/uploads/2009/02/jquery-select-html-manipulation.zip">Download source code for all examples above</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F&amp;title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F&amp;title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F&amp;title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F&amp;headline=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F&amp;title=jQuery+%26lt%3Bselect%26gt%3B+Manipulation%2C+Multiple+Selects+with+JSON%2C+Set+Defaults%2C+Oh+My&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F07%2Fjquery-select-manipulation-multiple-selects-json-default%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://websitebuildersresource.com/2010/01/24/php-country-array/" title="PHP Country Array">PHP Country Array</a></li><li><a href="http://websitebuildersresource.com/2010/01/04/blank-cdata-with-php-and-simplexml/" title="Blank CDATA with PHP and SimpleXML">Blank CDATA with PHP and SimpleXML</a></li><li><a href="http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/" title="Copy Form Input Data to Another Input Field with jQuery">Copy Form Input Data to Another Input Field with jQuery</a></li><li><a href="http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/" title="jQuery Show and Tell">jQuery Show and Tell</a></li><li><a href="http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/" title="Dynamic Javascript Variables">Dynamic Javascript Variables</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Copy Form Input Data to Another Input Field with jQuery</title>
		<link>http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/</link>
		<comments>http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:57:17 +0000</pubDate>
		<dc:creator>Jason Maletsky</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[fields]]></category>
		<category><![CDATA[forms]]></category>

		<guid isPermaLink="false">http://websitebuildersresource.com/?p=583</guid>
		<description><![CDATA[This is a very simple example how to copy form input data to other form fields. This is useful when the same information entered can be used in other fields such as shipping and billing address forms.]]></description>
			<content:encoded><![CDATA[<p>This is a very simple example how to copy form input data to other form fields. This is useful when the same information entered can be used in other fields such as shipping and billing address forms.</p>
<h3>jQuery</h3>
<pre><code class="javascript">$(document).ready(function(){
	$("input#same").click(function(){
		if ($("input#same").is(':checked'))
		{
			// Checked, copy values
			$("input#shipping-email").val($("input#email").val());
			$("input#shipping-name").val($("input#name").val());
			$("input#shipping-phone").val($("input#phone").val());
		}
		else
		{
			// Clear on uncheck
			$("input#shipping-email").val("");
			$("input#shipping-name").val("");
			$("input#shipping-phone").val("");
		}
	});
});</code></pre>
<h3>HTML</h3>
<pre><code class="html">&lt;form&gt;
Billing
Email:&lt;input id="email" name="email" type="text" value="test@example.com" /&gt;
Name:&lt;input id="name" name="name" type="text" value="John Smith" /&gt;
Phone:&lt;input id="phone" name="phone" type="text" value="(123) 456-7890" /&gt;

Shipping
Same?:&lt;input id="same" name="same" type="checkbox" /&gt;
Email:&lt;input id="shipping-email" name="email" type="text" /&gt;
Name:&lt;input id="shipping-name" name="name" type="text" /&gt;
Phone: &lt;input id="shipping-phone" name="phone" type="text" /&gt;
&lt;/form&gt;</code></pre>
<h2>Demo and Download</h2>
<p><a href="http://websitebuildersresource.com/demos/jquery-copy-form-data/" target="_blank">View a demo here</a></p>
<p><a href="http://websitebuildersresource.com/wp-content/uploads/2009/02/jquery-copy-form-data.zip">Download</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F&amp;title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F&amp;title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F&amp;title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F&amp;headline=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F&amp;title=Copy+Form+Input+Data+to+Another+Input+Field+with+jQuery&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F02%2F05%2Fcopy-form-input-data-to-another-input-field-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/" title="jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My">jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My</a></li><li><a href="http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/" title="jQuery Show and Tell">jQuery Show and Tell</a></li><li><a href="http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/" title="Dynamic Javascript Variables">Dynamic Javascript Variables</a></li><li><a href="http://websitebuildersresource.com/2008/12/20/show-partial-content-slide-animate-with-jquery/" title="Show Partial Content, Slide Animate with jQuery">Show Partial Content, Slide Animate with jQuery</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery Show and Tell</title>
		<link>http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/</link>
		<comments>http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 04:00:16 +0000</pubDate>
		<dc:creator>Jason Maletsky</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[hide]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.websitebuildersresource.com/?p=485</guid>
		<description><![CDATA[This jQuery code will slide up a hidden <div> up on hover() and slide down the same <div> on blur(). This script uses the jQuery UI visual control library.]]></description>
			<content:encoded><![CDATA[<p>This jQuery code will slide up a hidden &lt;div&gt; up on hover() and slide down the same &lt;div&gt; on blur(). This script uses the jQuery UI visual control library.</p>
<h3>JavaScripts</h3>
<p>Place the following in the  section of your code.</p>
<p><strong>Locally.</strong></p>
<pre><code class="html">&lt;script src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery.effects.core.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery.effects.slide.js"&gt;&lt;/script&gt;</code></pre>
<p><strong>Or you can call the scripts directly from jQuery.</strong></p>
<pre><code class="html">&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script src="http://ui.jquery.com/latest/ui/effects.core.js"&gt;&lt;/script&gt;
&lt;script src="http://ui.jquery.com/latest/ui/effects.slide.js"&gt;&lt;/script&gt;</code></pre>
<h3>HTML</h3>
<pre><code class="html">
&lt;div id="splash-image"&gt;
	&lt;img src="images/mercedes-c63-amg.jpg" alt="" /&gt;
&lt;/div&gt;

&lt;div class="tab-text tab-1"&gt;1&lt;/div&gt;
&lt;div class="tab-text tab-2"&gt;2&lt;/div&gt;
&lt;div class="tab-text tab-3"&gt;3&lt;/div&gt;
&lt;div class="tab-text tab-4"&gt;4&lt;/div&gt;

&lt;div id="splash-tabs"&gt;
	&lt;div class="splash-tab"&gt;&lt;a class="tab-text" rel="1" href="#"&gt;First&lt;/a&gt;&lt;/div&gt;
	&lt;div class="splash-tab"&gt;&lt;a class="tab-text" rel="2" href="#"&gt;Second&lt;/a&gt;&lt;/div&gt;
	&lt;div class="splash-tab"&gt;&lt;a class="tab-text" rel="3" href="#"&gt;Third&lt;/a&gt;&lt;/div&gt;
	&lt;div class="splash-tab"&gt;&lt;a class="tab-text" rel="4" href="#"&gt;Fourth&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</code></pre>
<h3>jQuery Code</h3>
<pre><code class="javascript">$(document).ready(function(){
	$("div.splash-tab").hover(
		function () {
			$(this).addClass("splash-tab-hover");
		},
		function () {
			$(this).removeClass("splash-tab-hover");
		}
	);

	$("a.tab-text").hover(
		function () {
			var tab = $(this).attr("rel");
			$("div.tab-" + tab).show("slide", { direction: "down" }, 500);

		},
		function () {
			var tab = $(this).attr("rel");
			$("div.tab-" + tab).hide("slide", { direction: "down" }, 500);

		}
	);
});</code></pre>
<h2>Demo and Download</h2>
<p><a href="http://www.websitebuildersresource.com/demos/show-and-tell/index.html" target="_blank">View a demo here</a></p>
<p><a href="http://www.websitebuildersresource.com/wp-content/uploads/2009/01/show-and-tell.zip">Download</a></p>
<h2>Resources</h2>
<p><a href="http://docs.jquery.com/UI" target="_blank">jQuery UI Documentation</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F&amp;title=jQuery+Show+and+Tell"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F&amp;title=jQuery+Show+and+Tell"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F&amp;title=jQuery+Show+and+Tell"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F&amp;headline=jQuery+Show+and+Tell"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=jQuery+Show+and+Tell&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=jQuery+Show+and+Tell&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=jQuery+Show+and+Tell&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=jQuery+Show+and+Tell&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=jQuery+Show+and+Tell&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F&amp;title=jQuery+Show+and+Tell&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F08%2Fjquery-show-and-tell%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/" title="jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My">jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My</a></li><li><a href="http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/" title="Copy Form Input Data to Another Input Field with jQuery">Copy Form Input Data to Another Input Field with jQuery</a></li><li><a href="http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/" title="Dynamic Javascript Variables">Dynamic Javascript Variables</a></li><li><a href="http://websitebuildersresource.com/2008/12/20/show-partial-content-slide-animate-with-jquery/" title="Show Partial Content, Slide Animate with jQuery">Show Partial Content, Slide Animate with jQuery</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dynamic Javascript Variables</title>
		<link>http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/</link>
		<comments>http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 19:51:35 +0000</pubDate>
		<dc:creator>Jason Maletsky</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[dynamic variable]]></category>

		<guid isPermaLink="false">http://www.websitebuildersresource.com/?p=467</guid>
		<description><![CDATA[To create dynamic variables in JavaScript use the eval() function. Of course eval() can be for other dynamic JavaScript creation as well.
function dynamic(id)
{
	// Create dynamic variable and set the value
	eval("var test_" + id + " = \"value goes here\";");

	// Return the value
	return eval("test_" + id);
}

// Call function
var test = dynamic(123);

// Display the value
document.write(test);

Demo
View a demo [...]]]></description>
			<content:encoded><![CDATA[<p>To create dynamic variables in JavaScript use the eval() function. Of course eval() can be for other dynamic JavaScript creation as well.</p>
<pre><code class="javascript">function dynamic(id)
{
	// Create dynamic variable and set the value
	eval("var test_" + id + " = \"value goes here\";");

	// Return the value
	return eval("test_" + id);
}

// Call function
var test = dynamic(123);

// Display the value
document.write(test);
</code></pre>
<h2>Demo</h2>
<p>View a demo <a href="http://www.websitebuildersresource.com/demos/dynamic-javascript-variables.html" target="_blank">here</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F&amp;title=Dynamic+Javascript+Variables"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F&amp;title=Dynamic+Javascript+Variables"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F&amp;title=Dynamic+Javascript+Variables"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F&amp;headline=Dynamic+Javascript+Variables"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=Dynamic+Javascript+Variables&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=Dynamic+Javascript+Variables&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=Dynamic+Javascript+Variables&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=Dynamic+Javascript+Variables&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=Dynamic+Javascript+Variables&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F&amp;title=Dynamic+Javascript+Variables&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2009%2F01%2F04%2Fdynamic-javascript-variables%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/" title="jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My">jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My</a></li><li><a href="http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/" title="Copy Form Input Data to Another Input Field with jQuery">Copy Form Input Data to Another Input Field with jQuery</a></li><li><a href="http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/" title="jQuery Show and Tell">jQuery Show and Tell</a></li><li><a href="http://websitebuildersresource.com/2008/12/20/show-partial-content-slide-animate-with-jquery/" title="Show Partial Content, Slide Animate with jQuery">Show Partial Content, Slide Animate with jQuery</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Show Partial Content, Slide Animate with jQuery</title>
		<link>http://websitebuildersresource.com/2008/12/20/show-partial-content-slide-animate-with-jquery/</link>
		<comments>http://websitebuildersresource.com/2008/12/20/show-partial-content-slide-animate-with-jquery/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 05:18:12 +0000</pubDate>
		<dc:creator>Jason Maletsky</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[partial content]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://www.websitebuildersresource.com/?p=363</guid>
		<description><![CDATA[This plugin will show a partial amount of content from a <div> and allow the user to click a link from the title or a link at the bottom to view the rest of the content with a sliding action.]]></description>
			<content:encoded><![CDATA[<p>This plugin will show a partial amount of content from a &lt;div&gt; and allow the user to click a link from the title or a link at the bottom to view the rest of the content with a sliding action.</p>
<p>This is based on the original post/code by <a href="http://sim.plified.com/2008/09/15/sliding-content-from-a-partial-height-with-jquery/" target="_blank">Chris Pollock</a>. Thanks Chris for the inspiration.</p>
<h3>Demo and Sources</h3>
<p><a href="http://www.websitebuildersresource.com/demos/slider/" target="_blank">Click here to view a demo</a></p>
<p><a href="http://www.websitebuildersresource.com/wp-content/uploads/2008/12/slider.zip">Download</a><br />
		<script type="text/javascript"><!--
            google_ad_client = "pub-1943674323840609";
            google_ad_slot = "4085228747";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
        </script><br />
        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<div class="lightsocial_container"><a href="http://digg.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F&amp;title=Show+Partial+Content%2C+Slide+Animate+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a href="http://www.reddit.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F&amp;title=Show+Partial+Content%2C+Slide+Animate+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F&amp;title=Show+Partial+Content%2C+Slide+Animate+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F&amp;headline=Show+Partial+Content%2C+Slide+Animate+with+jQuery"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a href="http://www.dzone.com/links/add.html?title=Show+Partial+Content%2C+Slide+Animate+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/sharer.php?t=Show+Partial+Content%2C+Slide+Animate+with+jQuery&amp;u=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?title=Show+Partial+Content%2C+Slide+Animate+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a href="http://www.dotnetkicks.com/kick/?title=Show+Partial+Content%2C+Slide+Animate+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a href="http://dotnetshoutout.com/Submit?title=Show+Partial+Content%2C+Slide+Animate+with+jQuery&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F&amp;title=Show+Partial+Content%2C+Slide+Animate+with+jQuery&amp;summary=&amp;source="><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a href="http://www.technorati.com/faves?add=http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwebsitebuildersresource.com%2F2008%2F12%2F20%2Fshow-partial-content-slide-animate-with-jquery%2F"><img src="http://websitebuildersresource.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://websitebuildersresource.com/2009/02/07/jquery-select-manipulation-multiple-selects-json-default/" title="jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My">jQuery &lt;select&gt; Manipulation, Multiple Selects with JSON, Set Defaults, Oh My</a></li><li><a href="http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/" title="Copy Form Input Data to Another Input Field with jQuery">Copy Form Input Data to Another Input Field with jQuery</a></li><li><a href="http://websitebuildersresource.com/2009/01/08/jquery-show-and-tell/" title="jQuery Show and Tell">jQuery Show and Tell</a></li><li><a href="http://websitebuildersresource.com/2009/01/04/dynamic-javascript-variables/" title="Dynamic Javascript Variables">Dynamic Javascript Variables</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://websitebuildersresource.com/2008/12/20/show-partial-content-slide-animate-with-jquery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
