<?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>Web Development Blog &#187; JavaScript</title>
	<atom:link href="http://www.leigeber.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leigeber.com</link>
	<description>This web development blog features fresh articles on JavaScript, AJAX, CSS, XHTML, PHP, Photoshop and more.</description>
	<lastBuildDate>Sat, 13 Feb 2010 02:05:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>JavaScript WYSIWYG Editor &#8211; TinyEditor</title>
		<link>http://www.leigeber.com/2010/02/javascript-wysiwyg-editor/</link>
		<comments>http://www.leigeber.com/2010/02/javascript-wysiwyg-editor/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 07:02:38 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[wysiwyg]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=339</guid>
		<description><![CDATA[TinyEditor is a simple JavaScript WYSIWYG editor that is both lightweight (8KB) and standalone. It can easily be customized to integrate with any website through CSS and the multitude of parameters.]]></description>
			<content:encoded><![CDATA[<p><a href="http://sandbox.leigeber.com/tinyeditor/"><img src="http://www.leigeber.com/wp-content/uploads/2010/02/editor.jpg" alt="JavaScript WYSIWYG Editor" width="592" height="215" /></a></p>
<p>TinyEditor is a simple JavaScript WYSIWYG editor that is both lightweight (8KB) and standalone. It can easily be customized to integrate with any website through CSS and the multitude of parameters. It handles most of the basic formatting needs and has some functionality built in to help keep the rendered markup as clean as possible. The icons are courtesy of <a href="http://www.famfamfam.com/">famfamfam</a> and have been combined into a sprite so there are only a few HTTP requests for the editor. I plan on adding some updates in the future to support font color, a full-screen mode, and a paste from Word option.</p>
<p>To initialize the script use the following:</p>
<pre class="brush: jscript;">new TINY.editor.edit('editor',{
	id:'input', // (required) ID of the textarea
	width:584, // (optional) width of the editor
	height:175, // (optional) heightof the editor
	cssclass:'te', // (optional) CSS class of the editor
	controlclass:'tecontrol', // (optional) CSS class of the buttons
	rowclass:'teheader', // (optional) CSS class of the button rows
	dividerclass:'tedivider', // (optional) CSS class of the button diviers
	controls:['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|', 'orderedlist', 'unorderedlist', '|' ,'outdent' ,'indent', '|', 'leftalign', 'centeralign', 'rightalign', 'blockjustify', '|', 'unformat', '|', 'undo', 'redo', 'n', 'font', 'size', 'style', '|', 'image', 'hr', 'link', 'unlink', '|', 'cut', 'copy', 'paste', 'print'], // (required) options you want available, a '|' represents a divider and an 'n' represents a new row
	footer:true, // (optional) show the footer
	fonts:['Verdana','Arial','Georgia','Trebuchet MS'],  // (optional) array of fonts to display
	xhtml:true, // (optional) generate XHTML vs HTML
	cssfile:'style.css', // (optional) attach an external CSS file to the editor
	content:'starting content', // (optional) set the starting content else it will default to the textarea content
	css:'body{background-color:#ccc}', // (optional) attach CSS to the editor
	bodyid:'editor', // (optional) attach an ID to the editor body
	footerclass:'tefooter', // (optional) CSS class of the footer
	toggle:{text:'source',activetext:'wysiwyg',cssclass:'toggle'}, // (optional) toggle to markup view options
	resize:{cssclass:'resize'} // (optional) display options for the editor resize
});</pre>
<p>The first parameter taken by TINY.editor.edit is the variable name used for the object instance. Keep in mind that before posting you will need to call the instance.post() function to ensure that the latest changes in the WYSIWYG translate into the text area. This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><a href="http://sandbox.leigeber.com/tinyeditor/">Click here for the demo.</a></p>
<p><a href="http://forum.leigeber.com/index.php?app=downloads&amp;showfile=10">Click here to download the source code.</a></p>
<p><strong>1/8/2010</strong> &#8211; Resolved a couple IE and Chrome issues and added some cleanup for Safari/Chrome. Thanks for the reports.</p>
<p><strong>1/12/2010</strong> &#8211; Resolved issue with conversion to lower case and the header row class.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2010/02/javascript-wysiwyg-editor/feed/</wfw:commentRss>
		<slash:comments>188</slash:comments>
		</item>
		<item>
		<title>Slideshow Script &#8211; TinySlider</title>
		<link>http://www.leigeber.com/2009/12/slideshow-script/</link>
		<comments>http://www.leigeber.com/2009/12/slideshow-script/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 19:44:37 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[slide]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=297</guid>
		<description><![CDATA[This lightweight slideshow script supports any content and gracefully degrades without JavaScript support. It supports automatic rotation with the option to auto-resume, an active class on a navigation list if applicable, and a direction toggle (vertical or horizontal).]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/12/tiny-slider.jpg" alt="Slideshow Script" width="592" height="300" /></p>
<p>This super lightweight (1.5KB) and standalone sliding slideshow script can easily be customized to integrate with any website through CSS. You can add any content to it, not just images, and it gracefully degrades without JavaScript support. The script supports automatic rotation with the option to auto-resume, an active class on a navigation list if applicable, and a direction toggle (vertical or horizontal).</p>
<p>To initialize the script use the following:</p>
<pre class="brush: jscript;">var slideshow=new TINY.slider.slide('slideshow',{
	id:'slider', // ID of the parent slideshow div
	auto:3, // Seconds to auto-advance, defaults to disabled
	resume:true, // Resume auto after interrupted, defaults to false
	vertical:false, // Direction, defaults to false
	navid:'pagination', // Optional ID of direct navigation UL
	activeclass:'current', // Class to set on the current LI
	position:0 // Initial slide position, defaulting to index 0
});</pre>
<p>The first parameter taken by TINY.slider.slide is the variable name used for the object instance. You can also optionally set width and height parameters for the applicable direction you are sliding. If it is not set the width or height will be automatically calculated using the offsetWidth/offsetHeight of the first list element. This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><a href="http://sandbox.leigeber.com/tinyslider/">Click here for the demo.</a></p>
<p><a href="http://forum.leigeber.com/index.php?app=downloads&#038;showfile=8">Click here to download the source code.</a></p>
<p><strong>12/8/2009</strong> – Fixed bug that threw slider into loop outside of constraints.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/12/slideshow-script/feed/</wfw:commentRss>
		<slash:comments>93</slash:comments>
		</item>
		<item>
		<title>Advanced JavaScript Table Sorter &#8211; TinyTable V3</title>
		<link>http://www.leigeber.com/2009/11/advanced-javascript-table-sorter/</link>
		<comments>http://www.leigeber.com/2009/11/advanced-javascript-table-sorter/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 01:06:24 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[sorter]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=278</guid>
		<description><![CDATA[The third iteration of the TinyTable table sorting script adds search, column averages and totals, record numbering, a view all function, and a reset function. At only 6KB it is still lightweight, quick, and includes all previous features.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/11/tinytablev3.jpg" alt="TinyTable Table Sorting V3" width="592" height="275" /></p>
<p>The third iteration of the TinyTable table sorting script adds search, column averages and totals, record numbering, a view all function, and a reset function. At only 6KB it is still lightweight, quick, and includes all previous TinyTable features. Other features include alternate row highlighting, header class toggling, auto data type recognition, and selective column sorting. If you don&#8217;t need the new features take a look at the <a href="http://www.leigeber.com/2009/03/table-sorter/">second version</a> of the script which weighs 2.5KB.</p>
<p>To initialize a table sorter follow the pattern below:</p>
<pre class="brush: jscript;">var sorter = new TINY.table.sorter('sorter','table',{
	headclass:'head', // Header Class //
	ascclass:'asc', // Ascending Class //
	descclass:'desc', // Descending Class //
	evenclass:'evenrow', // Even Row Class //
	oddclass:'oddrow', // Odd Row Class //
	evenselclass:'evenselected', // Even Selected Column Class //
	oddselclass:'oddselected', // Odd Selected Column Class //
	paginate:true, // Paginate? (true or false) //
	size:10, // Initial Page Size //
	colddid:'columns', // Columns Dropdown ID (optional) //
	currentid:'currentpage', // Current Page ID (optional) //
	totalid:'totalpages', // Current Page ID (optional) //
	startingrecid:'startrecord', // Starting Record ID (optional) //
	endingrecid:'endrecord', // Ending Record ID (optional) //
	totalrecid:'totalrecords', // Total Records ID (optional) //
	hoverid:'selectedrow', // Hover Row ID (optional) //
	pageddid:'pagedropdown', // Page Dropdown ID (optional) //
	navid:'tablenav', // Table Navigation ID (optional) //
	sortcolumn:1, // Index of Initial Column to Sort (optional) //
	sortdir:1, // Sort Direction (1 or -1) //
	sum:[8], // Index of Columns to Sum (optional) //
	avg:[6,7,8,9], // Index of Columns to Average (optional) //
	columns:[{index:7, format:'%', decimals:1},{index:8, format:'$', decimals:0}], // Sorted Column Settings (optional) //
	init:true // Init Now? (true or false) //
});</pre>
<p>The first parameter taken by TINY.table.sorter is the variable name used for the object, the second is the id of the table, and the third is the settings object. You can either initialize the script in the object creation by setting init to true or you can initialize it later using sorter.init().</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.leigeber.com/tinytablev3/index.html">Click here for the demo.</a></strong></p>
<p><strong><a href="http://forum.leigeber.com/index.php?app=downloads&amp;showfile=3">Click here to download the source code.</a></strong></p>
<p><strong>11/16/2009</strong> &#8211; Updated script to function correctly in IE6/IE7.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/11/advanced-javascript-table-sorter/feed/</wfw:commentRss>
		<slash:comments>91</slash:comments>
		</item>
		<item>
		<title>TinyScroller JavaScript Scrollable Div &#8211; 1.7KB</title>
		<link>http://www.leigeber.com/2009/09/javascript-scrollable-div/</link>
		<comments>http://www.leigeber.com/2009/09/javascript-scrollable-div/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 03:14:20 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[scrollbar]]></category>
		<category><![CDATA[scroller]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=215</guid>
		<description><![CDATA[TinyScroller is a basic scrollable div script at only 1.7KB. It can be used with any HTML and degrades gracefully. The styling is completely customizable through the simple CSS.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/09/scroller.gif" alt="Scrollable Div" width="592" height="325" /></p>
<p>TinyScroller is a basic scrollable div script at only 1.7KB. It can be used with any HTML and degrades gracefully. The styling is completely customizable through the simple CSS. More features will be coming soon. I have redesigned leigeber.com and am going to be publishing a number of scripts and articles shortly. I will also be releasing my previous blog theme for free. A few of the upcoming scripts:</p>
<ul>
<li>TinySlideshow V3 &#8211; many new features and fixes</li>
<li>TinyTable V3 &#8211; advanced search and filtering capabilities</li>
<li>TinySlider &#8211; sliding content script</li>
<li>TinyDrag &#8211; draggable box script</li>
<li>TinyBox V2 &#8211; many new features</li>
<li>TinyValidator &#8211; completely rewritten form validation</li>
<li>TinyTooltip &#8211; slick and full featured tooltip script</li>
<li>TinyEditor &#8211; lightweight JavaScript WYSIWYG editor</li>
<li>Bug fixes to all other existing scripts.</li>
</ul>
<p>To initialize a scrollable div use the following code:</p>
<pre class="brush: jscript;">TINY.scroller.init('scroll','content','scrollbar','scroller','active')</pre>
<p>The TINY.scroller.init function takes 5 parameters: the id of the parent content wrapper, the id of the content div, the id of the scroll div, the id of the scroll button, and the class of the scroll button active state (optional).</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.leigeber.com/scroller/">Click here to view the demo.</a></strong></p>
<p><strong><a href="http://sandbox.leigeber.com/scroller/TinyScroller.zip">Click here to download the script.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/09/javascript-scrollable-div/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Flash Charts With JavaScript API &#8211; amCharts</title>
		<link>http://www.leigeber.com/2009/06/flash-charts-amcharts/</link>
		<comments>http://www.leigeber.com/2009/06/flash-charts-amcharts/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 04:20:44 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[charting]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[graphs]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=197</guid>
		<description><![CDATA[amCharts if a full-featured Flash based charting library with a powerful JavaScript API.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/06/flash-charts.jpg" alt="Flash Charts" width="459" height="200" /></p>
<p>I have been working on a business intelligence application recently and did a lot of research for a Flash based library to build out dynamic charts. There are a number of players in the market, some free and some even open source. I ended up choosing a product called amCharts which seemed very flexible and the pricing was generally lower than the competition. You can download and use the charts for free with the &#8220;chart by amCharts&#8221; text in the top left corner, this comes in handy when evaluating. Being savvy with JavaScript, I liked the fact that there was a powerfully API behind the charts for data and settings manipulation. As such, there is no need for postbacks or tedious AJAX calls.</p>
<p>Another selling point was the ASP.NET control library they offer which made development much quicker. I also chose the developer license to get the full Flash source code for some custom modifications. One last cool feature is the chart builder at <a href="http://extra.amcharts.com/editor/">http://extra.amcharts.com/editor/</a> which makes visualizing the charts and generating the settings file a breeze. Charts like this can really add some &#8220;wow&#8221; factor to an application. They have an active community forum, plenty of documentation, and a helpful staff so check them out.</p>
<p><strong><a href="http://sandbox.leigeber.com/flash-charts/">Click here</a></strong> for a quick demonstration of a dynamic pie chart inside a draggable box which should be ready for release soon. If you are interested in the demo source you can download it <strong><a href="http://sandbox.leigeber.com/flash-charts/chart-demo.zip">here</a></strong>. Check out <strong><a href="http://www.amcharts.com/">their website</a></strong> for more demos and details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/06/flash-charts-amcharts/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>TinyBox JavaScript Popup Box &#8211; 3.4KB</title>
		<link>http://www.leigeber.com/2009/05/javascript-popup-box/</link>
		<comments>http://www.leigeber.com/2009/05/javascript-popup-box/#comments</comments>
		<pubDate>Sun, 24 May 2009 21:53:19 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[popup]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=174</guid>
		<description><![CDATA[TinyBox is a lightweight and standalone JavaScript popup box script. At only 3.4KB it allows for any AJAX or HTML input and can also be used for images and auto hiding alerts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/05/tiny-box.gif" alt="JavaScript Modal Window Script" width="459" height="175" /></p>
<p>TinyBox is a lightweight and standalone modal window script. At only 3.4KB it doesn&#8217;t include any slideshow capabilities built-in but allows for any AJAX or HTML input so the sky is the limit. Future versions will include additional features. It can also be used for images and auto hiding alerts. The popups fade in/out and dynamically size based on the content if enabled. The styling is completely customizable through the simple CSS. I have a couple tutorials and a few scripts I will be posting very soon so check back.</p>
<p>To display a popup box use the following code:</p>
<pre class="brush: jscript;">TINY.box.show('advanced.html',1,300,150,1,3);</pre>
<p>There is nothing to initialize, just start using the script. The TINY.box.show function takes 6 parameters: the HTML content for the box or the relative path to the AJAX source, a toggle (true/false or 1/0) if the content is via AJAX, the width of the window (use 0 for auto), the height of the window (use 0 for auto), a toggle (true/false or 1/0) to animate the window, and the time in seconds to wait before auto hiding the popup (optional).</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.leigeber.com/tinybox/">Click here for the demo.</a></strong></p>
<p><strong><a href="http://forum.leigeber.com/index.php?app=downloads&#038;showfile=4">Click here to download the source code.</a></strong></p>
<p><strong>Update 11/15/2009</strong> – Updated logic to speed up the animation and fix a positioning issue. Slightly dropped the code weight.</p>
<p><strong>Update 11/16/2009</strong> – Fixed issue that occurred when sizing down a box.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/05/javascript-popup-box/feed/</wfw:commentRss>
		<slash:comments>255</slash:comments>
		</item>
		<item>
		<title>TinyTable JavaScript Table Sorter &#8211; 2.5KB</title>
		<link>http://www.leigeber.com/2009/03/table-sorter/</link>
		<comments>http://www.leigeber.com/2009/03/table-sorter/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 04:38:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[sorter]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=154</guid>
		<description><![CDATA[This table sorter script is easy to use and feature packed at only 2.5KB. Features include column and alternate row highlighting, header class toggling, auto data type recognition, selective column sorting, pagination, link support, and more.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/03/tiny-table.gif" alt="Table Sorter" width="459" height="175" /></p>
<p>This updated table sorter script is easy to use and feature packed at only 2.5KB. New features include column highlighting, optional pagination, support for links, and date/link parsing. A few other features are alternate row highlighting, header class toggling, auto data type recognition and selective column sorting. More updates will follow soon.</p>
<p>To initialize a table sorter follow the pattern below:</p>
<pre class="brush: jscript;">var sorter = new TINY.table.sorter('sorter');
sorter.head = 'head'; //header class name
sorter.asc = 'asc'; //ascending header class name
sorter.desc = 'desc'; //descending header class name
sorter.even = 'evenrow'; //even row class name
sorter.odd = 'oddrow'; //odd row class name
sorter.evensel = 'evenselected'; //selected column even class
sorter.oddsel = 'oddselected'; //selected column odd class
sorter.paginate = true (false); //toggle for pagination logic
sorter.pagesize = 15 (20); //toggle for pagination logic
sorter.currentid = 'currentpage'; //current page id
sorter.limitid = 'pagelimit'; //page limit id
sorter.init('table',1);</pre>
<p>Before initialization, a new table sorter object must be created. The parameter taken by TINY.table.sorter is the variable name used for the object. The object.init function takes 2 parameters: the id of the table and the initially sorted column index (optional). If you want to exclude a column from sorting add class=”nosort” to the appropriate table header. Table styling is completely customizable via the CSS.</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.leigeber.com/table-sorter/index.html">Click here for the demo.</a></strong></p>
<p><strong><a href="http://sandbox.leigeber.com/table-sorter/sorter.zip">Click here to download the source code.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/03/table-sorter/feed/</wfw:commentRss>
		<slash:comments>228</slash:comments>
		</item>
		<item>
		<title>Accordion Script With Multi-Level Support</title>
		<link>http://www.leigeber.com/2009/03/accordion/</link>
		<comments>http://www.leigeber.com/2009/03/accordion/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 05:37:28 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[accordion]]></category>
		<category><![CDATA[collapsible]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.leigeber.com/?p=141</guid>
		<description><![CDATA[This accordion script is powerful and lightweight. It now includes multi-level support, a parameter to determine whether only one panel can be expanded concurrently, and a hide/show all toggle.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.leigeber.com/wp-content/uploads/2009/03/tiny-accordion.gif" alt="Accordion" width="459" height="175" /></p>
<p>This updated accordion script is powerful and lightweight at only 1.2kb. It now includes multi-level support, the option to allow multiple panels to expand concurrently, and a hide/show all toggle. I have reverted the markup to a div based structure to eliminate any validation issues with the definition tables in the previous version. Check back for more posts and scripts soon.</p>
<p>To initialize an accordion use the following code:</p>
<pre class="brush: jscript;">var accordion=new TINY.accordion.slider('accordion');
accordion.init('accordion','h3',0,0,'selected');</pre>
<p>You must create a new accordion object before initialization. The parameter taken by accordion.slider is the variable name used for the object. The object.init function takes 5 parameters: the id of the accordion “ul”, the header element tag, whether the panels should be expandable independently (optional), the index of the initially expanded section (optional) and the class for the active header (optional).</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://forum.leigeber.com/">available here</a>. Paid support is also available, <a href="http://www.leigeber.com/contact/">contact me</a> for details.</p>
<p><strong>Update 6/16/2009</strong></p>
<p>The script has been updated with a couple bug fixes, performance tweaks, and feature requests. I also shaved off 0.2KB.</p>
<p>You can now expand a particular section by its index, for example parentAccordion.pr(0,1), with the second parameter being the index of the section. If you don&#8217;t want any section to be expanded by default then use -1 for the initially expanded index in the initialization function, example accordion.init(&#8220;accordion&#8221;,&#8221;h3&#8243;,0,-1,&#8221;selected&#8221;). The script is also no longer tied to a strict doctype. If you are using this along with Flash, be sure to set the wmode property on the SWF object.</p>
<p><strong><a href="http://sandbox.leigeber.com/javascript-accordion/index.html">Click here for the demo.</a></strong></p>
<p><strong><a href="http://forum.leigeber.com/index.php?app=downloads&#038;showfile=5">Click here to download the source code.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leigeber.com/2009/03/accordion/feed/</wfw:commentRss>
		<slash:comments>170</slash:comments>
		</item>
	</channel>
</rss>
