<?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>monkeydummy &#187; javascript</title>
	<atom:link href="http://www.monkeydummy.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monkeydummy.com</link>
	<description>whatever I want it to be</description>
	<lastBuildDate>Wed, 08 Feb 2012 01:05:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>McGinty &amp; White Website Update</title>
		<link>http://www.monkeydummy.com/mcginty-white-website-update-2/</link>
		<comments>http://www.monkeydummy.com/mcginty-white-website-update-2/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 20:00:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[website design]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jplayer]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.monkeydummy.com/?p=104</guid>
		<description><![CDATA[Last weekend I finished designing and building a new website (and logo) for Ward White and Joe McGinty – mcgintyandwhite.com. Joe and Ward are New York/Brooklyn based songwriters who perform regularly around New York and the East Coast. They&#8217;ll be doing a show at Joe&#8217;s Pub, NYC on March 10, 2012 covering a catalog of songs [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend I finished designing and building a new website (and logo) for Ward White and Joe McGinty – <a title="McGinty and White" href="http://mcgintyandwhite.com" target="_blank">mcgintyandwhite.com</a>. Joe and Ward are New York/Brooklyn based songwriters who perform regularly around New York and the East Coast. They&#8217;ll be doing a show at <a title="McGinty &amp; White Sing Webb at Joe's Pub, NYC" href="http://www.joespub.com/component/option,com_shows/task,view/Itemid,40/id,5992" target="_blank">Joe&#8217;s Pub, NYC on March 10, 2012</a> covering a catalog of songs written by <a title="Wikipedia: Jimmy Webb" href="http://en.wikipedia.org/wiki/Jimmy_Webb" target="_blank">Jimmy Webb</a>. Previously they released an album, McGinty &amp; White Sing Songs from the McGinty &amp; White Songbook, featuring one of Webb&#8217;s better known songs – Wichita Lineman. Both are longtime admirers of Jimmy Webb&#8217;s songwriting.</p>
<p>For the site, I used a modified version of Twitter&#8217;s <a title="Bootstrap" href="http://twitter.github.com/bootstrap/" target="_blank">Bootstrap</a> for the page structure, <a title="jquery" href="http://jquery.com/" target="_blank">jquery</a> for page animation and <a title="jplayer" href="http://jplayer.org/" target="_blank">jplayer</a>, an open source, HTML5 and jquery media library which falls back to Flash for IE 6 &amp;7. Below are some key snippets used in the site&#8217;s design:</p>
<p><strong>Fonts</strong></p>
<p><a title="Font Squirrel" href="http://www.fontsquirrel.com/" target="_blank">Font Squirrel</a> has a fairly nice selection of free fonts along with an @font-face generator. The generator will prepare the fonts in formats suitable for hosting, then accessed by the @font-face CSS rule. I chose Bree Serif for the site. There are other options, including <a title="Google Webfonts" href="http://www.google.com/webfonts#HomePlace:home" target="_blank">Google</a>, for using fonts a visitor to the site may not have installed on their computer.</p>
<pre class="brush: css; title: ; notranslate">
@font-face {
    font-family: 'BreeSerifRegular';
    src: url('BreeSerif-Regular-webfont.eot');
    src: url('BreeSerif-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('BreeSerif-Regular-webfont.woff') format('woff'),
         url('BreeSerif-Regular-webfont.ttf') format('truetype'),
         url('BreeSerif-Regular-webfont.svg#BreeSerifRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}
</pre>
<p><strong>Background Images</strong></p>
<p><strong></strong>After doing a quick survey, it looks like IE9, FF 3.0 ↑, Saf 4.0 ↑, Chrome 4 ↑ and Opera 10.10 ↑ all support multiple background images. McGinty &amp; White&#8217;s website users, for the most part, were using browsers that could display all the images.</p>
<pre class="brush: css; title: ; notranslate">
	background:url(&quot;img/right-vig.png&quot;) no-repeat top right,
	           url(&quot;img/left-vig.png&quot;) no-repeat top left,
	           url(&quot;img/hero-bg3.jpg&quot;) repeat top left;
</pre>
<p><strong>Page Animation</strong><br />
Jquery is responsible for the page animation (&#8220;smooth scrolling&#8221; when a navigation button is clicked). To make it work, the div the page animates over needs to be fixed and the z-index set to a lower value than the div animating over it, Jquery handles the rest by scrolling to anchor points on the page.</p>
<p><em>CSS</em></p>
<pre class="brush: css; title: ; notranslate">
z-index: 0;
position: fixed;
</pre>
<p><em>Javascript</em></p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.min.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
    		$(document).ready(function() { 			$('a[href^=&quot;#&quot;]').click(function(event) { 				var id = $(this).attr(&quot;href&quot;); 				var offset = 60; 				var target = $(id).offset().top - offset; 				$('html, body').animate({scrollTop:target}, 500); 				event.preventDefault(); 			}); 		});
// ]]&gt;&lt;/script&gt;
</pre>
<p><strong>Music Player</strong><br />
Jplayer is easy to use and supports audio as well as video. Below is not the full code for implementing Jplayer, just the portion for linking to songs and displaying the playlist. This is all the code that needs to be altered (as I remember). It can be styled for individual sites by changing the linked css file and supports both mp3 and ogg files for use in all browsers. IE8 and below use a linked Flash file hosted on the server (swfPath near the end of the snippet), yet the look of the player does not change when Flash is employed.</p>
<pre class="brush: jscript; title: ; notranslate">
var audioPlaylist = new Playlist(&quot;2&quot;, [
				{
					name:&quot;Everything Is Fine&quot;,
					mp3:&quot;PATH TO/everything-is-fine.mp3&quot;,
					oga:&quot;PATH TO/everything-is-fine.ogg&quot;
				},
				{
					name:&quot;I'm So Tired&quot;,
					mp3:&quot;PATH TO/im-so-tired.mp3&quot;,
					oga:&quot;PATH TO/im-so-tired.ogg&quot;
				},
				{
					name:&quot;Knees&quot;,
					mp3:&quot;PATH TO/knees.mp3&quot;,
					oga:&quot;PATH TO/knees.ogg&quot;
				},
				{
					name:&quot;Big Baby&quot;,
					mp3:&quot;PATH TO/mw/big-baby.mp3&quot;,
					oga:&quot;PATH TO/big-baby.ogg&quot;
				},
				{
					name:&quot;Wichita Lineman&quot;,
					mp3:&quot;PATH TO/wichita-lineman.mp3&quot;,
					oga:&quot;PATH TO/wichita-lineman.ogg&quot;
				}
			], {
				ready: function() {
					audioPlaylist.displayPlaylist();
					audioPlaylist.playlistInit(false); // Parameter is a boolean for autoplay.
				},
				ended: function() {
					audioPlaylist.playlistNext();
				},
				play: function() {
					$(this).jPlayer(&quot;pauseOthers&quot;);
				},
				swfPath: &quot;PATH TO/js&quot;,
				supplied: &quot;oga, mp3&quot;
			});
</pre>
<p>That just about covers it. Go see McGinty &amp; White live <a title="McGinty &amp; White Sing Webb at Joe's Pub, NYC" href="http://www.joespub.com/component/option,com_shows/task,view/Itemid,40/id,5992" target="_blank">at Joe&#8217;s Pub</a> on March 10.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeydummy.com/mcginty-white-website-update-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

