<?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>Papermashup.com &#187; Tutorials</title>
	<atom:link href="http://papermashup.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://papermashup.com</link>
	<description>Ashley Ford :: CSS &#124; PHP &#124; JavaScript</description>
	<lastBuildDate>Wed, 07 Jul 2010 09:39:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery form titles</title>
		<link>http://papermashup.com/jquery-form-titles/</link>
		<comments>http://papermashup.com/jquery-form-titles/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 09:10:14 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[forms]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1986</guid>
		<description><![CDATA[I thought I&#8217;d share a little technique that I occasionally use when coding forms with a limited amount of space. It&#8217;s a simple effect that allows you to  contain the form input or textarea title within the form allowing the user to click inside the form input to remove it. You often see this used on search fields
The JavaScript
firstly we assign a class of &#8216;form-field&#8217; as well as adding the attribute &#8216;defaultVal&#8217; with the text that we want to display in our input field.
The ...]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d share a little technique that I occasionally use when coding forms with a limited amount of space. It&#8217;s a simple effect that allows you to  contain the form input or textarea title within the form allowing the user to click inside the form input to remove it. You often see this used on search fields</p>
<h3>The JavaScript</h3>
<p>firstly we assign a class of &#8216;form-field&#8217; as well as adding the attribute &#8216;defaultVal&#8217; with the text that we want to display in our input field.</p>
<p>The code below simply adjusts the input value attribute depending on if the user click in the field and types text so we have a state of change for &#8216;focus&#8217; and &#8216;blur&#8217;.</p>
<pre class="brush: jscript;">
$(document).ready(function(){

  $('.form-field').each( function () {
    $(this).val($(this).attr('defaultVal'));
    $(this).css({color:'#ccc'});
      });

  $('.form-field').focus(function(){
    if ( $(this).val() == $(this).attr('defaultVal') ){
      $(this).val('');
      $(this).css({color:'#000'});
    }
    });
  $('.form-field').blur(function(){
    if ($(this).val() == '' ){
      $(this).val($(this).attr('defaultVal'));
      $(this).css({color:'#ccc'});
    }
    });

});
</pre>
<h3>The HTML</h3>
<pre class="brush: xml;">
 &lt;form method=&quot;post&quot; action=&quot;&quot;&gt;

	    &lt;input type=&quot;text&quot; class=&quot;form-field&quot; name=&quot;Name&quot; defaultVal=&quot;Name&quot; value=&quot;&quot; /&gt;
            &lt;input type=&quot;text&quot; class=&quot;form-field&quot; name=&quot;Phone&quot; defaultVal=&quot;Phone Number&quot; value=&quot;&quot; /&gt;
            &lt;input type=&quot;text&quot; class=&quot;form-field&quot; name=&quot;Email&quot; defaultVal=&quot;Email address&quot; value=&quot;&quot; /&gt;
            &lt;input type=&quot;text&quot; class=&quot;form-field&quot; name=&quot;Url&quot; defaultVal=&quot;Site URL&quot; value=&quot;&quot; /&gt;

	&lt;/form&gt;
</pre>
<p><a href="http://papermashup.com/demos/jquery-form-titles/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/jquery-form-titles/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using CufÃ³n font replacement</title>
		<link>http://papermashup.com/using-cufon-font-replacement/</link>
		<comments>http://papermashup.com/using-cufon-font-replacement/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 17:26:42 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cufon]]></category>
		<category><![CDATA[font size]]></category>
		<category><![CDATA[fonts]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1974</guid>
		<description><![CDATA[I&#8217;d never used CufÃ³n font replacement until a few weeks ago when I was sifting through some code that another designer had written and noticed that he was using CufÃ³n. Not that many people seem to know about CufÃ³n though. CufÃ³n uses a blend of font generator tools and JavaScript to create a custom font renderer in canvas and VML. Hereâ€™s how to use CufÃ³n to render the Junction font for all your headers.

Generate the font
first of all you&#8217;ll need to head here and convert ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d never used CufÃ³n font replacement until a few weeks ago when I was sifting through some code that another designer had written and noticed that he was using CufÃ³n. Not that many people seem to know about CufÃ³n though. CufÃ³n uses a blend of font generator tools and JavaScript to create a custom font renderer in canvas and VML. Hereâ€™s how to use CufÃ³n to render the Junction font for all your headers.</p>
<p><img class="alignnone size-full wp-image-1977" title="cufon" src="http://papermashup.com/wp-content/uploads/2010/07/cufon.jpg" alt="" width="583" height="213" /></p>
<h3>Generate the font</h3>
<p>first of all you&#8217;ll need to head here and convert your font ready for cufÃ³n. There are plenty of options to adjust how the font renders, you can include different fonts for weights as well as italic etc.</p>
<h3>Include the JavaScript</h3>
<p>Once you have your font converted in the CufÃ³n format you&#8217;ll need to include the CufÃ³n JavaScript file which you can find <a href="http://cufon.shoqolate.com/js/cufon-yui.js">here</a> as well as the font file that you converted above.</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot; src=&quot;cufon.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;junction_400.font.js&quot;&gt;&lt;/script&gt;
</pre>
<h3>Specify your elements</h3>
<pre class="brush: jscript;">
	Cufon.replace('h1, h2, h3', { fontFamily: 'Junction' });
</pre>
<p><a href="http://papermashup.com/demos/cufon-fonts/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/using-cufon-font-replacement/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>MySpace Open Search API</title>
		<link>http://papermashup.com/myspace-open-search-api/</link>
		<comments>http://papermashup.com/myspace-open-search-api/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 20:47:21 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[Open Search]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1957</guid>
		<description><![CDATA[The MySpace Search API allows you to search MySpace for user, videos, images, and music. With an individual feed for each search item. It is designed to function like a search on the MySpace website and to have a response format that is compatible with OpenSocial. The API returns either JSON or XML and in this tutorial i&#8217;ll be using PHP and CURL to parse an XML response to build a simple MySpace search page.
Application use
Open Search could be used to mash data using the ...]]></description>
			<content:encoded><![CDATA[<p>The MySpace Search API allows you to search MySpace for user, videos, images, and music. With an individual feed for each search item. It is designed to function like a search on the MySpace website and to have a response format that is compatible with OpenSocial. The API returns either JSON or XML and in this tutorial i&#8217;ll be using PHP and CURL to parse an XML response to build a simple MySpace search page.</p>
<h3>Application use</h3>
<p>Open Search could be used to mash data using the MySpace API with other applications, for example automatically pulling in a users MySpace profile image, name, location and URL.  Building a Facebook application that recommends bands to you on MySpace.</p>
<p><img class="alignnone size-full wp-image-1963" title="MySpace api" src="http://papermashup.com/wp-content/uploads/2010/07/myspace-api.jpg" alt="" width="583" height="213" /></p>
<h3>The Code</h3>
<p>Just like the Twitter search API tutorial that I did a last year we&#8217;re using the CURL function in PHP5 to allow us to parse the XML file and format the data that we get back.</p>
<h3>Here&#8217;s how it works</h3>
<p>Any search that we make will send GET variables through the page URL therefore making it easy to see the data that we&#8217;re sending to the API generally you will see search pages use this method as we&#8217;re not transmitting private data such as usernames or passwords.</p>
<p>The search data is stored in the variable $q if nothing is searched for initially we run a default search mainly for demo purposes with the search term &#8216;Coldplay&#8217;. You&#8217;ll notice that the first result on the left is highlighted green, this is because it is the official profile for the Coldplay. you can see that we construct the URL and store it in the variable $search. There are many different variables that can be passed to the API. It&#8217;s worth pointing out that we&#8217;re using the People search call. You can see all the values that can be passed in <a href="http://wiki.developer.myspace.com/index.php?title=Open_Search#Searching_for_People">here</a></p>
<p>Here is an example XML request: <a href="http://api.myspace.com/opensearch/people?searchTerms=ferrari&amp;format=xml">http://api.myspace.com/opensearch/people?searchTerms=ferrari&amp;format=xml</a></p>
<pre class="brush: php;">

//Search API Script

$q=$_GET['q'];

if($_GET['q']==''){

$q = 'coldplay';

}

if($_GET['pics']==1){

$pics[0] = '&amp;hasPhoto=on';
$pics[1] = 'checked';

}

if(!empty($_GET['location'])){

$pics[0] = '&amp;location='.urlencode($_GET['location']).'';

}

$search = &quot;http://api.myspace.com/opensearch/people?searchTerms=&quot;.urlencode($q).&quot;&amp;format=xml&quot;.$pics[0].&quot;&quot;;

$cu = curl_init();

curl_setopt($cu, CURLOPT_URL, $search);
curl_setopt($cu, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($cu);
$search_res = new SimpleXMLElement($result);

echo &quot;&lt;h3&gt;&quot;.$search_res-&gt;totalResults.&quot; MySpace results for '&quot;.$q.&quot;'&lt;/h3&gt;&quot;;

// Echo the Search Data

foreach ($search_res-&gt;entry as $user) {

$officialprofile = null;

if($user-&gt;isOfficial==1){

$officialprofile = 'official';

}

echo &quot;&lt;div class='user &quot;.$officialprofile.&quot;'&gt;&lt;a href=\&quot;&quot;.$user-&gt;profileUrl.&quot;\&quot; target=\&quot;_blank\&quot;&gt;&lt;img border=\&quot;0\&quot; width=\&quot;68\&quot; class=\&quot;user_image\&quot; src=\&quot;&quot;.$user-&gt;thumbnailUrl.&quot;\&quot; title=\&quot;&quot;.$user-&gt;displayName.&quot;\&quot; /&gt;&lt;/a&gt;&quot;;
echo &quot;&lt;div class='text'&gt;&quot;.$user-&gt;displayName.&quot;&lt;/div&gt; &lt;strong&gt;&quot;.$user-&gt;location.&quot;&lt;/strong&gt;&lt;br/&gt;&lt;a href='&quot;.$user-&gt;profileUrl.&quot;' &gt;Visit &quot;.$officialprofile.&quot; profile&lt;/a&gt;&lt;div class='clear'&gt;&lt;/div&gt;&lt;/div&gt;&quot;;

}

curl_close($cu);
</pre>
<pre class="brush: php;">
&lt;div id=&quot;search&quot;&gt;
&lt;form action=&quot;&quot; method=&quot;get&quot;&gt;
  Search MySpace &lt;input type=&quot;text&quot; name=&quot;q&quot; value=&quot;&lt;?php echo $q;?&gt;&quot; id=&quot;searchbox&quot; /&gt;
 Location &lt;input type=&quot;text&quot; name=&quot;location&quot; value=&quot;&lt;?php echo $_GET['location'];?&gt;&quot; id=&quot;location&quot; /&gt;
  Only show users with profile pics &lt;input name=&quot;pics&quot; type=&quot;checkbox&quot; value=&quot;1&quot; &lt;?php echo $pics[1];?&gt; /&gt;
  &lt;input type=&quot;submit&quot; name=&quot;submit&quot; id=&quot;submit&quot; value=&quot;Search&quot; /&gt;

&lt;/form&gt;
&lt;/div&gt;
</pre>
<p><a href="http://papermashup.com/demos/myspace-open-search/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a><a href="http://papermashup.com/demos/myspace-open-search/myspace-open-search.zip"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/myspace-open-search-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building an animated 3D poll</title>
		<link>http://papermashup.com/building-an-animated-3d-poll/</link>
		<comments>http://papermashup.com/building-an-animated-3d-poll/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 13:11:22 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[poll]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1939</guid>
		<description><![CDATA[Regular readers of Papermashup will have seen the post that I wrote last week on Easy Poll, the personal project that I launched a few weeks back that allows you to create a simple 2 answer poll that you can share and gather feedback on. You can read the post about it and check out easypoll.papermashup here I&#8217;d love to hear your feedback.
I thought i&#8217;d cover how to create a 3d animated poll using jQuery and CSS similar to the polls page on Easy Poll.
The ...]]></description>
			<content:encoded><![CDATA[<p>Regular readers of Papermashup will have seen the post that I wrote last week on <a href="http://easypoll.papermashup.com">Easy Poll</a>, the personal project that I launched a few weeks back that allows you to create a simple 2 answer poll that you can share and gather feedback on. You can <a href="http://papermashup.com/easypoll-a-side-project/">read the post</a> about it and check out <a href="http://easypoll.papermashup.com/">easypoll.papermashup here</a> I&#8217;d love to hear your feedback.</p>
<p>I thought i&#8217;d cover how to create a 3d animated poll using jQuery and CSS similar to the polls page on Easy Poll.</p>
<h3>The Code</h3>
<p>I don&#8217;t usually do this but here&#8217;s the complete code snippet so you can see the JavaScript CSS and HTML all in one space. most of the configuration is achieved thought the CSS but you&#8217;ll notice that on page load the bars animate to the correct height using the jQuery animate function which we&#8217;re passing a percentage height into.</p>
<p><img class="alignnone size-full wp-image-1946" title="poll" src="http://papermashup.com/wp-content/uploads/2010/06/poll.jpg" alt="" width="582" height="217" /></p>
<pre class="brush: xml;">

&lt;head&gt;
&lt;style&gt;
.rating {
float:left;
width:180px;
background-image:url(images/poll-bottom.png);
background-position:bottom left;
background-repeat:no-repeat;
padding-bottom:40px;
}

.graph {
float:left;
margin-top:10px;
position:relative;
height:380px;
padding:0;
}

.graph .bar1, .graph .bar2, .graph .bar3{
display:block;
position:absolute;
background-image:url(images/poll-body.png);
background-position:top left;
color:#fff;
width:159px;
min-height:70px;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
line-height:1.9em;
bottom:0;
}

.graph .bar1 span, .graph .bar2 span,  .graph .bar3 span  {
position:absolute;
left:50px;
top:20px;
font-size:33px;
color:#333;
text-shadow:0 1px #fff;
}

&lt;/style&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

  $(document).ready(function(){

  $('.bar1').animate({'height':'22%'},500);
  $('.bar2').animate({'height':'58%'},1000);
  $('.bar3').animate({'height':'88%'},1500);

  });

&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;div class=&quot;polls&quot;&gt;

        &lt;div class=&quot;rating&quot;&gt;
            	&lt;div class=&quot;graph&quot;&gt;
                	&lt;strong class=&quot;bar1&quot;&gt;
                    &lt;span&gt;22%&lt;/span&gt;
                    &lt;/strong&gt;
                &lt;/div&gt;
			&lt;div class=&quot;ans&quot;&gt;Answer 1&lt;/div&gt;
	    &lt;/div&gt;

	     &lt;div class=&quot;rating&quot;&gt;
            	&lt;div class=&quot;graph&quot;&gt;
                	&lt;strong class=&quot;bar2&quot;&gt;
                    &lt;span&gt;58%&lt;/span&gt;
                    &lt;/strong&gt;
                &lt;/div&gt;

		   &lt;div class=&quot;ans&quot;&gt;Answer 2&lt;/div&gt;
	    &lt;/div&gt;

            &lt;div class=&quot;rating&quot;&gt;
            	&lt;div class=&quot;graph&quot;&gt;
                	&lt;strong class=&quot;bar3&quot;&gt;
                    &lt;span&gt;88%&lt;/span&gt;
                    &lt;/strong&gt;
                &lt;/div&gt;

		   &lt;div class=&quot;ans&quot;&gt;Answer 3&lt;/div&gt;
	    &lt;/div&gt;

        &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
</pre>
<p><a href="http://papermashup.com/demos/3d-poll/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a><a href="http://papermashup.com/demos/3d-poll/3d-poll.zip"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/building-an-animated-3d-poll/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Build a jQuery content feature like MailChimp</title>
		<link>http://papermashup.com/build-a-jquery-content-feature-like-mailchimp/</link>
		<comments>http://papermashup.com/build-a-jquery-content-feature-like-mailchimp/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 15:00:03 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1921</guid>
		<description><![CDATA[I was scouring the internet for inspiration the other day and revisiting some interesting sites  and noticed that MailChimp had changed their homepage integrating a slick full page slider. After a little investigation I noticed that they were using the jQuery Cycle plugin which allows you to rotate, paginate or cycle a set of images. I&#8217;ve been looking for a full sized slider for a while now and was about to write a tutorial on building a plugin that does the same job.
The Code
Getting ...]]></description>
			<content:encoded><![CDATA[<p>I was scouring the internet for inspiration the other day and revisiting some interesting sites  and noticed that <a href="http://mailchimp.com">MailChimp</a> had changed their homepage integrating a slick full page slider. After a little investigation I noticed that they were using the <a href="http://jquery.malsup.com/cycle/">jQuery Cycle plugin</a> which allows you to rotate, paginate or cycle a set of images. I&#8217;ve been looking for a full sized slider for a while now and was about to write a tutorial on building a plugin that does the same job.</p>
<h3>The Code</h3>
<p>Getting started with this plugin is really simple, you first need to include the cycle.js plugin you can find more info about the plugin including all the settings available <a href="http://jquery.malsup.com/cycle/">here</a>. This div structure allows you to assign different background images to each slide. </p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/06/mailchimp.png" alt="" title="mailchimp" width="583" height="300" class="alignnone size-full wp-image-1933" /></p>
<p>You can easily change the effect of the image transitions by replacing fx:&#8217;scrollVert&#8217; with &#8216;fade&#8217; for a simple transifion between frames, or  &#8216;scrollHorz&#8217; for the images to slide in horizontally.</p>
<p>Setup of the cycle plugin is simple with the settings below. you can adjust the speed, the initial timeout for when the page loads that the first frame is seen for and the delay between transitions.</p>
<pre class="brush: jscript;">
  $(document).ready( function($) {

    $('#slider').cycle({
      fx: 'scrollVert',
      speed: 1000,
      pause: 1,
      timeout: 7000,
      delay: 500,
      prev: '#slider_next',
      next: '#slider_prev'
    });

  });
</pre>
<h3>The HTML</h3>
<pre class="brush: xml;">
  &lt;div id=&quot;slider&quot;&gt;
    &lt;!-- slider --&gt;
    &lt;div id=&quot;iphone&quot; class=&quot;slider&quot;&gt;
      &lt;a href=&quot;http://papermashup.com&quot; title=&quot;iPhone 4 coming soon&quot; class=&quot;slider_content&quot;&gt;iPhone 4 coming soon&lt;/a&gt;
    &lt;/div&gt;
    &lt;!-- slider --&gt;
    &lt;div id=&quot;macbook&quot; class=&quot;slider&quot;&gt;
      &lt;a href=&quot;http://papermashup.com&quot; title=&quot;Macbook Get One&quot; class=&quot;slider_content&quot;&gt;Macbook Get One&lt;/a&gt;
    &lt;/div&gt;
    &lt;!-- slider --&gt;
    &lt;div id=&quot;ipad&quot; class=&quot;slider&quot;&gt;
      &lt;a href=&quot;http://papermashup.com&quot; title=&quot;The new iPad&quot; class=&quot;slider_content&quot;&gt;The new iPad&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id=&quot;slider_controls&quot;&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slider_prev&quot;&gt;Previous&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot; id=&quot;slider_next&quot;&gt;Next&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
</pre>
<h3>The CSS</h3>
<pre class="brush: css;">
#slider {
	width: 100%;
	overflow: hidden;
	height: 301px;
}
.slider {
	height: 301px;
	width: 100%!important;
}
.slider_content {
	width: 1020px;
	height: 301px;
	margin: 0 auto;
	display: block;
	text-indent: -9999px;
}
#ipad {
	background: url('images/ipad-bg.jpg') repeat-x 50% 0;
        width: 100%;
        height: 301px;
}
#ipad .slider_content {
	background: transparent url('images/ipad.jpg') no-repeat top left;
}
#iphone {
	background: #000000 url('images/bg.jpg') repeat-x 50% 0;
        width: 100%;
        height: 301px;
}
#iphone .slider_content {
	background: transparent url('images/iphone.jpg') no-repeat top left;
}
#macbook {
	background: #000000 url('images/macbook-bg.jpg') repeat-x 50% 0;
        width: 100%;
        height: 301px;
}
#macbook .slider_content {
	background: transparent url('images/macbook.jpg') no-repeat top left;
}

#slider_controls {
	width: 958px;
	position: relative;
	margin: 0 auto;
	height: 1px;
}
#slider_controls ul {
	background: transparent url('images/nav.png') no-repeat bottom center;
	display:block;
	height:32px;
	position:absolute;
	right:0;
	text-indent:-9999px;
	top:-31px;
	width:164px;
	z-index:9998;
}
#slider_controls li {
	float: left;
	width: 82px;
	height: 32px;
}
#slider_controls li a {
	display: block;
	height: 32px;
}
</pre>
<p>This slider is both elegant, simple to maintain and easy to code as well as being lightweight on the browser.</p>
<p><a href="http://papermashup.com/demos/jquery-slideshow/"><img src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" title="demo" class="alignnone size-full wp-image-23" /></a><a href="http://papermashup.com/demos/jquery-slideshow/jquery-slideshow.zip"><img src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" title="download" class="alignnone size-full wp-image-24" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/build-a-jquery-content-feature-like-mailchimp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using jQuery Arrays</title>
		<link>http://papermashup.com/using-jquery-arrays/</link>
		<comments>http://papermashup.com/using-jquery-arrays/#comments</comments>
		<pubDate>Fri, 21 May 2010 22:37:18 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1869</guid>
		<description><![CDATA[I was recently in a situation where I needed to count a number of list items and pass the values to a form, I got around this problem by using JavaScript arrays, looping through the list items and picking up one of the attributes. I&#8217;ve created a demo page to show an example of this here. Lets run through the code. We start with our dom ready function which has two click functions one function toggles a class which is either added or removed from ...]]></description>
			<content:encoded><![CDATA[<p>I was recently in a situation where I needed to count a number of list items and pass the values to a form, I got around this problem by using JavaScript arrays, looping through the list items and picking up one of the attributes. I&#8217;ve created a demo page to show an example of this <a href="http://papermashup.com/demos/jquery-arrays/">here</a>. Lets run through the code. We start with our dom ready function which has two click functions one function toggles a class which is either added or removed from a checkbox that is clicked and the second function is triggered when you click the submit button, this function loops through each element that has the &#8216;selected&#8217; class then pushes the value into the array.</p>
<h3>The Code</h3>
<pre class="brush: jscript;">
$(document).ready(function() {

    $(&quot;input&quot;).click(function () {

		$(this).toggleClass('selected');

      });

	// on submit check selected class for a value
    $(&quot;.submit&quot;).click(function () {

	var itemsarray = [];

      $(&quot;#list li .selected&quot;).each(function () {

       var items = $(this).attr('value');
	   itemsarray.push(items);

      });

	  // this is where we could process the array or POST it with AJAX
	  alert(itemsarray);

	});

});
</pre>
<h3>The HTML</h3>
<pre class="brush: xml;">
  &lt;ul id=&quot;list&quot;&gt;
&lt;li&gt;&lt;input value=&quot;Advertising&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Advertising&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Art&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Art&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Automotive&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Automotive&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Business&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Business&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Celebrity&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Celebrity&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Comedian&quot; type=&quot;checkbox&quot; class=&quot;&quot; /&gt; Comedian&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Education&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Education&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Entertainment&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Entertainment&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Family&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Family&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Fashion&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Fashion&lt;/li&gt;
&lt;li&gt;&lt;input value=&quot;Film&quot; type=&quot;checkbox&quot; class=&quot;&quot;/&gt; Film&lt;/li&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/ul&gt;

    &lt;div class=&quot;submit&quot;&gt;Submit&lt;/div&gt;
</pre>
<p><a href="http://papermashup.com/demos/jquery-arrays/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/using-jquery-arrays/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>20 Complete scripts to download</title>
		<link>http://papermashup.com/20-complete-scripts-to-download/</link>
		<comments>http://papermashup.com/20-complete-scripts-to-download/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 22:01:20 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[Trends]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript Vimeo Tutorials API Downloads]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1812</guid>
		<description><![CDATA[I&#8217;ve put together a nice little collection of scripts over the past year or so, and have decided as it&#8217;s approaching summer in the UK (sorry winter in Australia!) to do a download bundle of 20 assorted scripts where you can get the lot in one click for free! Although donations are also much appreciated. Check out the list below for all the details of the package. This collection is based on a variety of different techniques, from CSS, PHP jQuery to MySQL.

What&#8217;s in the ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put together a nice little collection of scripts over the past year or so, and have decided as it&#8217;s approaching summer in the UK (sorry winter in Australia!) to do a download bundle of 20 assorted scripts where you can get the lot in one click for free! Although <a class="thickbox" title="Download And Donate" onclick="return false;" href="http://papermashup.com/wp-content/themes/arthemia/donate.php?download=http://papermashup.com/demos/bundle/bundle.zip&amp;keepThis=true&amp;TB_iframe=true&amp;height=220&amp;width=620">donations</a> are also much appreciated. Check out the list below for all the details of the package. This collection is based on a variety of different techniques, from CSS, PHP jQuery to MySQL.</p>
<p><img class="alignnone size-full wp-image-1834" title="boxes" src="http://papermashup.com/wp-content/uploads/2010/04/boxes.png" alt="" width="583" height="180" /></p>
<h3>What&#8217;s in the bundle?</h3>
<ol>
<li>
<h4>jQuery Drag &amp; Drop</h4>
<p>Using jQuery PHP and MySQL a complete drag and drop script that updates the database. <a href="http://papermashup.com/demos/jquery-drag-drop/">demo</a></li>
<li>
<h4>jQuery Delete</h4>
<p>Delete items using PHP jQuery using an AJAX request <a href="http://papermashup.com/demos/jquery-delete/">demo</a></li>
<li>
<h4>PHP jQuery and MySQL Autosuggest</h4>
<p>A powerful autosuggest script that searches a MySQL database to return you result <a href="http://papermashup.com/demos/autosuggest/">demo</a></li>
<li>
<h4>jQuery &amp; PHP username checker</h4>
<p>Checks the database to see if a chosen username exists in the database and returns true or false <a href="http://papermashup.com/demos/check-username/">demo</a></li>
<li>
<h4>CSS3 Buttons</h4>
<p>Styling elegant buttons using CSS3 <a href="http://papermashup.com/demos/css-buttons/">demo</a></li>
<li>
<h4>Feedburner Stats</h4>
<p>Using PHP and CURL to get your feedburner subscriber count <a href="http://papermashup.com/demos/feedburner-stats/">demo</a></li>
<li>
<h4>jQuery &amp; PHP username checker</h4>
<p>Checks the database to see if a chosen username exists in the database and returns true or false <a href="http://papermashup.com/demos/check-username/">demo</a></li>
<li>
<h4>jQuery image Zoom</h4>
<p>create a simple gallery with a hover image effect <a href="http://papermashup.com/demos/image-jquery/">demo</a></li>
<li>
<h4>jQuery PHP &amp; MySQL inline editing</h4>
<p>Edit page content directly in the browser inline using jQuery AJAX requests <a href="http://papermashup.com/demos/inline-editing/">demo</a></li>
<li>
<h4>jQuery Gallery</h4>
<p>Animated jQuery gallery with title and description <a href="http://papermashup.com/demos/jquery-gallery/index-title.html">demo</a></li>
<li>
<h4>Highlighting form inputs</h4>
<p>Highlight any input field using JavaScript <a href="http://papermashup.com/demos/jquery-highlighting-form-inputs/">demo</a></li>
<li>
<h4>jQuery JSON &amp; PHP</h4>
<p>Create a simple product gallery using JSONP PHP and MySQL <a href="http://papermashup.com/demos/jquery-json-php/">demo</a></li>
<li>
<h4>jQuery Tabs</h4>
<p>Simple tabs rendered using jQuery <a href="http://papermashup.com/demos/jquery-tabs/">demo</a></li>
<li>
<h4>jQuery XML</h4>
<p>build a product gallery parsing XML using jQuery <a href="http://papermashup.com/demos/jquery-xml/">demo</a></li>
<li>
<h4>jTruncate</h4>
<p>Using the jTruncate plugin to truncate text with a &#8216;more&#8217; link <a href="http://papermashup.com/demos/jtruncate/">demo</a></li>
<li>
<h4>PHP Page scrape</h4>
<p>Scrape page contents using PHP and CURL <a href="http://papermashup.com/demos/page-scrape/">demo</a></li>
<li>
<h4>AJAX Check</h4>
<p>Check to see if a normal GET or POST request was made or if an AJAX request was made <a href="http://papermashup.com/demos/ajax-check/">demo</a></li>
<li>
<h4>PHP Pagination</h4>
<p>A useful and raw PHP pagination script that could be adapted in to a class <a href="http://papermashup.com/demos/php-pagination/">demo</a></li>
<li>
<h4>jQuery Sliding Menu</h4>
<p>jQuery drop down slide in / out menu inspired by 9rules.com <a href="http://papermashup.com/demos/jquery-menu/">demo</a></li>
<li>
<h4>jQuery Tooltips</h4>
<p>An experimentation into building jQuery tooltips with AJAX requests, images etc <a href="http://papermashup.com/demos/tooltip/">demo</a></li>
</ol>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="PHJ3K79G49EHN" />
<input alt="PayPal - The safer, easier way to pay online." name="submit" src="http://papermashup.com/wp-content/uploads/2010/04/donate.png" type="image" /> <img style="border: 0px;" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" border="0" alt="" width="1" height="1" /><br />
</form>
<p><a class="thickbox" title="Download And Donate" onclick="return false;" href="http://papermashup.com/wp-content/themes/arthemia/donate.php?download=http://papermashup.com/demos/bundle/bundle.zip&amp;keepThis=true&amp;TB_iframe=true&amp;height=220&amp;width=620"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/20-complete-scripts-to-download/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Building a fancy jQuery header feature</title>
		<link>http://papermashup.com/building-a-fancy-jquery-header-feature/</link>
		<comments>http://papermashup.com/building-a-fancy-jquery-header-feature/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 06:30:59 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1789</guid>
		<description><![CDATA[I&#8217;ve recently been working on a project where a client came to me with an idea to create a feature on their homepage which shows three sections of dynamic content, this lead me to think about writing a tutorial on how to create a jQuery feature such as this. I remember a few years back seeing a similar technique on a website but back then I had no idea how to create such a thing. You can check out the demo here.the photo&#8217;s used in ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been working on a project where a client came to me with an idea to create a feature on their homepage which shows three sections of dynamic content, this lead me to think about writing a tutorial on how to create a jQuery feature such as this. I remember a few years back seeing a similar technique on a website but back then I had no idea how to create such a thing. You can check out the demo <a href="http://papermashup.com/demos/jquery-feature/">here</a>.the photo&#8217;s used in the demo are via flickr and are credited to <a href="http://www.flickr.com/photos/floridapfe/">Floridapfe</a> an amazing photographer from South Korea.</p>
<h3>The JavaScript</h3>
<p>This might not be the best way to structure the JavaScript and I&#8217;m sure you hard core coders will pick up on this however one of the purposes of this tutorial is to show newcomers to jQuery exactly how flexible and easy it is to create something that on the outside looks quick complex. The code used in this tutorial is relatively simple to understand.</p>
<p><img class="alignnone size-full wp-image-1796" title="feat" src="http://papermashup.com/wp-content/uploads/2010/04/feat.jpg" alt="" width="583" height="212" /></p>
<p>we start with out document ready function, you should be familiar with this by now. If you&#8217;re not you can read about it <a href="http://docs.jquery.com/Tutorials:Introducing_$(document).ready()">here</a>. We now have an event handler, in our case its a &#8216;hover&#8217; event meaning that when our cursor hovers over the div &#8216;.holder&#8217; it will execute the function. When our mouse exits the div &#8216;.holder&#8217; it will run the handler out function, which in our case will revert the div back to how it was originally.</p>
<p>You can see that we&#8217;re using &#8216;(this)&#8217; to reference our element. this is used to specify the element that the mouse is hovered over at that moment as we&#8217;re specifying the class holder, if we didn&#8217;t use &#8216;(this)&#8217; regardless of which element we hovered over all of them would animate, so &#8216;(this)&#8217; specifys that specific element to animate.</p>
<p>Lets look at what happens when we hover over one of the divs &#8216;.holder&#8217;.</p>
<ol>
<li>For the element our mouse is over we remove the class &#8216;notactive&#8217;</li>
<li>We then animate the width of the divs with a class of &#8216;notactive&#8217; this is to compensate for the expanding width of the selected element as you&#8217;ll see in the next step</li>
<li>Now we increase the width of the current &#8216;.holder&#8217; div to 380px</li>
<li>Next we slide the image up to make way for the text.</li>
<li>We then change the background color of the span header to black to highlight it.</li>
<li>And finally over 300 milliseconds fade in the &#8216;.text&#8217; div.</li>
</ol>
<p>Because the animations aren&#8217;t chained they happen all at the same time.</p>
<p>When you&#8217;re mouse leaves the div the function below it is run to revert the contents back to it&#8217;s original position.</p>
<pre class="brush: jscript;">&lt;br&gt;&lt;br&gt;$(document).ready(function(){&lt;br&gt;&lt;br&gt;	 $('.holder').hover(&lt;br&gt;		function () {&lt;br&gt;		$(this).removeClass('.notactive');&lt;br&gt;		$('.notactive').stop().animate({'width':'290px'},400);&lt;br&gt;                $(this).stop().animate({'width':'380px'},400);&lt;br&gt;        $(this).find('img').stop().animate({'top':'-165px'},400);&lt;br&gt;		$(this).find('span').css({'background-color':'#000'});&lt;br&gt;		$(this).find('.text').fadeIn(300);&lt;br&gt;      },&lt;br&gt;	    function () {&lt;br&gt;		  	$('.notactive').stop().animate({'width':'320px'},400);&lt;br&gt;		  	$(this).addClass('.notactive');&lt;br&gt;			$(this).find('.text').hide();&lt;br&gt;       	                $(this).find('img').stop().animate({'top':'0px'},500);&lt;br&gt;		        $(this).stop().animate({'width':'320px'},400);&lt;br&gt;			$(this).find('span').css({'background-color':'#333', 'color':'#dedede'}); &lt;br&gt;&lt;br&gt;      });&lt;br&gt;&lt;br&gt;});&lt;br&gt;&lt;br&gt;</pre>
<h3>The HTML</h3>
<pre class="brush: xml;">&lt;br&gt;&amp;lt;div class=&quot;main&quot;&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;holder notactive&quot;&amp;gt; &amp;lt;img class=&quot;image&quot; src=&quot;http://farm3.static.flickr.com/2784/4237135170_61a9938781.jpg&quot; height=&quot;&quot;/&amp;gt; &amp;lt;span&amp;gt;Image One&amp;lt;/span&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;text&quot;&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,&amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;holder notactive&quot;&amp;gt; &amp;lt;img class=&quot;image&quot; src=&quot;http://farm3.static.flickr.com/2599/4166210326_06d91ce72a.jpg&quot;/&amp;gt; &amp;lt;span&amp;gt;Image Two&amp;lt;/span&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;text&quot;&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,&amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;holder notactive&quot;&amp;gt; &amp;lt;img class=&quot;image&quot; src=&quot;http://farm3.static.flickr.com/2443/4060303038_a630262185.jpg&quot;/&amp;gt; &amp;lt;span&amp;gt;Image Three&amp;lt;/span&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;text&quot;&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,&amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;br&gt;</pre>
<h3>The CSS</h3>
<pre class="brush: css;">&lt;br&gt;&lt;br&gt;.holder {&lt;br&gt;	overflow:hidden;&lt;br&gt;	width:320px;&lt;br&gt;	height:333px;&lt;br&gt;	float:left;&lt;br&gt;	position:relative;&lt;br&gt;	background-color:#000;&lt;br&gt;	margin-right:1px;&lt;br&gt;}&lt;br&gt;.holder .image {&lt;br&gt;	position:absolute;&lt;br&gt;	left:-100px;&lt;br&gt;}&lt;br&gt;.holder span {&lt;br&gt;	background-color:#333;&lt;br&gt;	font-size:27px;&lt;br&gt;	font-family:Arial, Helvetica, sans-serif;&lt;br&gt;	color:#dedede;&lt;br&gt;	font-weight:700;&lt;br&gt;	padding:4px;&lt;br&gt;	position:absolute;&lt;br&gt;	top:120px;&lt;br&gt;	left:4px;&lt;br&gt;}&lt;br&gt;.holder .text {&lt;br&gt;	padding:20px;&lt;br&gt;	display:none;&lt;br&gt;	font-family:Arial, Helvetica, sans-serif;&lt;br&gt;	line-height:26px;&lt;br&gt;	position:absolute;&lt;br&gt;	top:180px;&lt;br&gt;	font-size:16px;&lt;br&gt;	color:#fff;&lt;br&gt;	width:340px;&lt;br&gt;}&lt;br&gt;.clear {&lt;br&gt;	clear:both;&lt;br&gt;}&lt;br&gt;.main {&lt;br&gt;	width:1000px;&lt;br&gt;	height:333px;&lt;br&gt;	margin:0 auto;&lt;br&gt;	overflow:hidden;&lt;br&gt;}&lt;br&gt;</pre>
<p><a href="http://papermashup.com/demos/jquery-feature/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a><a href="http://papermashup.com/demos/jquery-feature/jquery-feature.zip"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/building-a-fancy-jquery-header-feature/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Simple CSS Navigation</title>
		<link>http://papermashup.com/simple-css-navigation/</link>
		<comments>http://papermashup.com/simple-css-navigation/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:23:51 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1780</guid>
		<description><![CDATA[Navigation is a key feature on any site and for a front end web designer or developer there&#8217;s nothing more important than creating the perfect navigation menu. Today I&#8217;m going to run through how to create a pure CSS navigation strip using basic HTML and CSS. This will give you a basic understanding of how to put together a CSS menu that works efficiently. This tutorial is aimed at beginners who are learning CSS.
The HTML
The HTML used to generate our menu are simple list items. ...]]></description>
			<content:encoded><![CDATA[<p>Navigation is a key feature on any site and for a front end web designer or developer there&#8217;s nothing more important than creating the perfect navigation menu. Today I&#8217;m going to run through how to create a pure CSS navigation strip using basic HTML and CSS. This will give you a basic understanding of how to put together a CSS menu that works efficiently. This tutorial is aimed at beginners who are learning CSS.</p>
<h3>The HTML</h3>
<p>The HTML used to generate our menu are simple list items. within a div container.</p>
<pre class="brush: xml;">
&lt;div id=&quot;cont&quot;&gt;

&lt;ul id=&quot;nav&quot;&gt;
	&lt;li class=&quot;firstitem&quot;&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/php/&quot;&gt;PHP Tutorials&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/tutorials/&quot;&gt;Tutorials&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/design/&quot;&gt;Design&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/jquery/&quot;&gt;jQuery&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/api/&quot;&gt;APIs&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/mobile/&quot;&gt;Mobile&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/facebook/&quot;&gt;Facebook&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/analytics/&quot;&gt;Analytics&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/web-tools/&quot;&gt;Web Tools&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://papermashup.com/category/frameworks/&quot;&gt;Frameworks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
</pre>
<h3>The CSS</h3>
<p>Each list item element is floated left in order to get the menu to display horizontally.</p>
<pre class="brush: css;">
#cont {
	border-bottom: solid 1px #994400;
	background: #ff7200;
	margin: 0 auto 0 auto;
}

#nav {
	list-style: none;
	background: #ff7200;
	height: 37px;
	width: 800px;
	margin:0 auto;
	padding:0px;
	border-left: solid 1px #ff9141;
}

#nav li {
	float: left;
	border-right: solid 1px #ca5600;
	height: 37px;
}

	#nav li.firstitem {
		border-left: solid 1px #ca5600;
	}

#nav li a, #nav li a:link, #nav li a:visited {
	text-decoration: none;
	display: block;
	float: left;
	height: 37px;
	color: #fff;
	line-height: 37px;
	padding: 0 10px 0 10px;
	border-right: solid 1px #ff9141;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 700;
	outline: none;
}

#nav li a:hover, #nav li a:focus, #nav li a:active {
	background-color: #c95500;
	color: #fff;
}
</pre>
<p><a href="http://papermashup.com/demos/css-navigation/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/simple-css-navigation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parse XML with jQuery</title>
		<link>http://papermashup.com/parse-xml-with-jquery/</link>
		<comments>http://papermashup.com/parse-xml-with-jquery/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 11:15:37 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1745</guid>
		<description><![CDATA[I recently ran through the technique of parsing JSON with jQuery and thought i&#8217;d pick this up and show you how to parse XML. It&#8217;s pretty much the same although the big difference with using XML is that this won&#8217;t work for xml files that don&#8217;t sit outside of your domain as we&#8217;re making a standard AJAX request and you can&#8217;t make cross domain ajax request unless you&#8217;re using JSONP, more of which can be found here.
The XML
Here&#8217;s our XML code, and for the purpose ...]]></description>
			<content:encoded><![CDATA[<p>I recently ran through the technique of parsing JSON with jQuery and thought i&#8217;d pick this up and show you how to parse XML. It&#8217;s pretty much the same although the big difference with using XML is that this won&#8217;t work for xml files that don&#8217;t sit outside of your domain as we&#8217;re making a standard AJAX request and you can&#8217;t make cross domain ajax request unless you&#8217;re using JSONP, <a href="http://papermashup.com/json-and-php-product-gallery/">more of which can be found here</a>.</p>
<h3>The XML</h3>
<p>Here&#8217;s our XML code, and for the purpose of the demo i&#8217;ve saved it as books.xml. You can see that we have an XML node called &#8216;book&#8217; these help to structure the xml file elements. You will see that each book has a title, description and date. You could for instance add an image tag or anything for that matter.</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;RecentBooks&gt;
  &lt;Book&gt;
    &lt;Title&gt;My Cool Book Title&lt;/Title&gt;
    &lt;Description&gt;The my cool book is possibly the best cool book in that any developer could use to be a great web designer.&lt;/Description&gt;
    &lt;Date&gt;12/1/2010&lt;/Date&gt;
  &lt;/Book&gt;
  &lt;Book&gt;
    &lt;Title&gt;Another PHP book&lt;/Title&gt;
    &lt;Description&gt;Learn everything about PHP with 'Another PHP book,' your ultimate guide to the ins and outs of PHP.&lt;/Description&gt;
    &lt;Date&gt;4/1/2010&lt;/Date&gt;
  &lt;/Book&gt;
  &lt;Book&gt;
    &lt;Title&gt;jQuery Techniques&lt;/Title&gt;
    &lt;Description&gt;jQuery techniques runs you through real life examples of jQuery from beginner to expert&lt;/Description&gt;
    &lt;Date&gt;6/2/2010&lt;/Date&gt;
  &lt;/Book&gt;
  &lt;Book&gt;
    &lt;Title&gt;MySQL Database Book&lt;/Title&gt;
    &lt;Description&gt;Brush up your knowledge with the best MySQL database book on the market.&lt;/Description&gt;
    &lt;Date&gt;14/2/2010&lt;/Date&gt;
  &lt;/Book&gt;
&lt;/RecentBooks&gt;
</pre>
<h3>The JavaScript</h3>
<p>The first thing we need to do in order to parse our XML file is to make an AJAX request to get the XML file, The XML file has to sit on the same domain as the JavaScript below because we can&#8217;t do cross domain AJAX requests.</p>
<blockquote><p>IMPORTANT. Because of the nature of JavaScript you can&#8217;t make a cross domain AJAX request, this can only be achieved by <a href="http://papermashup.com/json-and-php-product-gallery/">using JSONP</a></p></blockquote>
<p>Once we have the XML file we need to parse it and get the data that we need. The way we do this is by using the .find() function. By using this we can specify each book node and loop through them to get the data. We then append the data in to the .main div.</p>
<pre class="brush: jscript;">
$(document).ready(function () {
    $.ajax({
        type: &quot;GET&quot;,
        url: &quot;books.xml&quot;,
        dataType: &quot;xml&quot;,
        success: xmlParser
    });
});

function xmlParser(xml) {

    $('#load').fadeOut();

    $(xml).find(&quot;Book&quot;).each(function () {

        $(&quot;.main&quot;).append('&lt;div class=&quot;book&quot;&gt;&lt;div class=&quot;title&quot;&gt;' + $(this).find(&quot;Title&quot;).text() + '&lt;/div&gt;&lt;div class=&quot;description&quot;&gt;' + $(this).find(&quot;Description&quot;).text() + '&lt;/div&gt;&lt;div class=&quot;date&quot;&gt;Published ' + $(this).find(&quot;Date&quot;).text() + '&lt;/div&gt;&lt;/div&gt;');
        $(&quot;.book&quot;).fadeIn(1000);

    });

}
</pre>
<h3>The HTML</h3>
<p>The contents of the XML file will be injected into the .main div. Once the XML data is parsed the loading gif is faded out.</p>
<pre class="brush: xml;">

&lt;div class=&quot;main&quot;&gt;
&lt;div align=&quot;center&quot; class=&quot;loader&quot;&gt;&lt;img src=&quot;loader.gif&quot; id=&quot;load&quot; width=&quot;16&quot; height=&quot;11&quot; align=&quot;absmiddle&quot;/&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
</pre>
<p><a href="http://papermashup.com/demos/jquery-xml/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a><a href="http://papermashup.com/demos/jquery-xml/jquery-xml.zip"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/parse-xml-with-jquery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
