<?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>Brian Grinstead &#187; html</title>
	<atom:link href="http://www.briangrinstead.com/blog/tag/html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.briangrinstead.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 20:23:16 +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>filereader.js &#8211; A Lightweight FileReader Wrapper</title>
		<link>http://www.briangrinstead.com/blog/filereaderjs</link>
		<comments>http://www.briangrinstead.com/blog/filereaderjs#comments</comments>
		<pubDate>Sun, 14 Nov 2010 07:33:13 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[filereader]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.briangrinstead.com/blog/?p=438</guid>
		<description><![CDATA[filereader.js is lighweight wrapper for the JavaScript FileReader interface.]]></description>
			<content:encoded><![CDATA[<p>I am working on project that needs to read local files.  This relies on the FileReader interface, and I couldn&#8217;t find any JavaScript libraries to help out with common usage for this, so I made one.</p>
<p>FileReader is a JavaScript interface that allows you to read local files as binary.  This is available in <a href='http://caniuse.com/#feat=fileapi'>supported browsers</a> when a user drags and drops files into a browser window or selects files from an input with a type of file.  See the <a href='http://dev.w3.org/2006/webapi/FileAPI/#FileReader-interface'>FileReader specification</a> for more information.</p>
<p>filereader.js is a wrapper for accessing this functionality.  It can be called using:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">FileReaderJS.<span style="color: #660066;">setupInput</span><span style="color: #009900;color: #000000;">&#40;</span>fileInput<span style="color: #339933;color: #000000;">,</span> opts<span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
FileReaderJS.<span style="color: #660066;">setupDrop</span><span style="color: #009900;color: #000000;">&#40;</span>dropbox<span style="color: #339933;color: #000000;">,</span> opts<span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span></pre></div></div>

<p>If you use jQuery, you can access these calls with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #3366CC;color: #808080;">&quot;#fileInput&quot;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">fileReaderJS</span><span style="color: #009900;color: #000000;">&#40;</span>opts<span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #3366CC;color: #808080;">&quot;#dropbox&quot;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">fileReaderJS</span><span style="color: #009900;color: #000000;">&#40;</span>opts<span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span></pre></div></div>

<p>To see the full range of options and functionality, view the <a href='https://github.com/bgrins/filereader.js/blob/master/README'>readme</a>.</p>
<p>filereader.js is available under the MIT License.  See the full <a href="http://github.com/bgrins/filereader.js">filereader.js code</a> or the single file <a href='https://github.com/bgrins/filereader.js/raw/master/filereader.js'>raw javascript source</a> on github.</p>
<p>You can see an example project using filereader.js on Instant Sprite, a browser based <a href="http://instantsprite.com">CSS Sprite Generator</a> that I am working on.  Try dragging images onto the body, or clicking to add multiple image files to see what is possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briangrinstead.com/blog/filereaderjs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Table Rows Sortable Using jQuery UI Sortable</title>
		<link>http://www.briangrinstead.com/blog/make-table-rows-sortable-using-jquery-ui-sortable</link>
		<comments>http://www.briangrinstead.com/blog/make-table-rows-sortable-using-jquery-ui-sortable#comments</comments>
		<pubDate>Thu, 30 Jul 2009 20:17:51 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cell]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery-ui]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sortable]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.briangrinstead.com/blog/?p=352</guid>
		<description><![CDATA[I wrote an article, Make Table Rows Sortable Using jQuery UI Sortable on the Foliotek Development Blog about a problem that I ran into when trying to set up a basic sortable table using jQuery UI. The columns would collapse down once the dragging began. This was fixed by adjusting the helper object for the [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote an article, <em><a href='http://www.foliotek.com/devblog/make-table-rows-sortable-using-jquery-ui-sortable/'>Make Table Rows Sortable Using jQuery UI Sortable</a></em> on the <a href='http://www.foliotek.com/devblog'>Foliotek Development Blog</a> about a problem that I ran into when trying to set up a basic sortable table using jQuery UI.  The columns would collapse down once the dragging began.  </p>
<p><img src="http://briangrinstead.com/files/sotable-row-collapsed.png" alt="sortable-row-collapsed" title="sortable-row-collapsed" class="aligncenter size-full" /></p>
<p>This was fixed by adjusting the <a href='http://jqueryui.com/demos/sortable/#option-helper'>helper object</a> for the sortable function.  Check out the [article][] for all the details, but here is a sample of the code if you are just looking for the solution:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;color: #008000;">// Return a helper with preserved width of cells</span>
<span style="color: #003366; font-weight: bold;color: #0000FF;">var</span> fixHelper <span style="color: #339933;color: #000000;">=</span> <span style="color: #003366; font-weight: bold;color: #0000FF;">function</span><span style="color: #009900;color: #000000;">&#40;</span>e<span style="color: #339933;color: #000000;">,</span> ui<span style="color: #009900;color: #000000;">&#41;</span> <span style="color: #009900;color: #000000;">&#123;</span>
	ui.<span style="color: #660066;">children</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #003366; font-weight: bold;color: #0000FF;">function</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span> <span style="color: #009900;color: #000000;">&#123;</span>
		$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;color: #0000FF;">this</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;color: #000000;">&#40;</span>$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;color: #0000FF;">this</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
	<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span>
	<span style="color: #000066; font-weight: bold;color: #0000FF;">return</span> ui<span style="color: #339933;color: #000000;">;</span>
<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #339933;color: #000000;">;</span>
&nbsp;
$<span style="color: #009900;color: #000000;">&#40;</span><span style="color: #3366CC;color: #808080;">&quot;#sort tbody&quot;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">sortable</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#123;</span>
	helper<span style="color: #339933;color: #000000;">:</span> fixHelper
<span style="color: #009900;color: #000000;">&#125;</span><span style="color: #009900;color: #000000;">&#41;</span>.<span style="color: #660066;">disableSelection</span><span style="color: #009900;color: #000000;">&#40;</span><span style="color: #009900;color: #000000;">&#41;</span><span style="color: #339933;color: #000000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.briangrinstead.com/blog/make-table-rows-sortable-using-jquery-ui-sortable/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

