<?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>Social Vitamin &#187; CSS</title>
	<atom:link href="http://www.socialvitamin.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.socialvitamin.com</link>
	<description>Give your social space a vitamin boost.</description>
	<lastBuildDate>Tue, 17 Aug 2010 20:34:48 +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>10 jQuery 1.3 Tips and Tricks for everyday use</title>
		<link>http://www.socialvitamin.com/2009/05/18/10-jquery-13-techniques-you-cant-live-without/</link>
		<comments>http://www.socialvitamin.com/2009/05/18/10-jquery-13-techniques-you-cant-live-without/#comments</comments>
		<pubDate>Mon, 18 May 2009 17:22:18 +0000</pubDate>
		<dc:creator>Michael D. Irizarry</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.socialvitamin.com/?p=145</guid>
		<description><![CDATA[Some useful jQuery Tips and Tricks for your everyday use. Removing and Hiding Dom Elements, Browser Detection, Toggling, Handling Select Lists and more. 1. Removing, Showing or Hiding DOM elements [...]]]></description>
			<content:encoded><![CDATA[<p>Some useful jQuery Tips and Tricks for your everyday use. Removing and Hiding Dom Elements, Browser Detection, Toggling, Handling Select Lists and more.<br />
<span id="more-145"></span></p>
<h3>1. Removing, Showing or Hiding DOM elements</h3>
<pre lang="Javascript">
// Remove Element
$("#div").remove();

// Hide
$("#div").hide();
$("#div").hide("slow");
$("#div").hide("fast");
$("#div").hide(1000);
$("#div").hide(1000, callback); 

// Show
$("#div").show();
$("#div").show("slow");
$("#div").show("fast");
$("#div").show(1000);
$("#div").show(1000, callback);  

// Toggle Hide/ Show
$("#div").toggle();
$("#div").toggle("slow");
</pre>
<h3>2. Select All Check Boxes</h3>
<pre lang="Javascript">
// Check
$("#selectList").attr('checked', true); 

// Uncheck
$("#selectList").attr('checked', false);
</pre>
<h3>3. Creating Images on the Fly</h3>
<pre lang="Javascript">
$("<img/>").attr({ "src": "images/loadingAnimation.gif" }).appendTo("#div");
</pre>
<h3>4. jQuery noConflict used when using other libraries</h3>
<pre lang="Javascript">
var $j = jQuery.noConflict();
$j('#div').hide();
</pre>
<h3>5. Getting Selected Radio Button value</h3>
<pre lang="Javascript">
$("input[name='id'][checked]").val();
</pre>
<h3>6.  Getting Select List values</h3>
<pre lang="Javascript">
// Value
$('#selectList').val(); 

// Text value
$('#selectList :selected').text() 

// Multiple Selection
var selections = [];
$('#multipleList :selected').each(function(i, selected){
     selections[i] = $(selected).text();
});
</pre>
<h3>7. Check if checkbox is Checked</h3>
<pre lang="Javascript">
$('#checkBox').attr('checked'); 

$('#checkBoxID').is(':checked'); 

$("[:checkbox]:checked").each(
    function() {
    }
);
</pre>
<h3>8. Browser Detection</h3>
<pre lang="Javascript">
if( $.browser.safari ) { // Do something }

if ($.browser.msie &#038;&#038; $.browser.version > 6 ) { // Do something }

if ($.browser.msie &#038;&#038; $.browser.version <= 6 ) { // Do something }

if ($.browser.mozilla &#038;&#038; $.browser.version >= "1.8" )  { // Do something }
</pre>
<h3>9. Highlight a Row onClick</h3>
<pre lang="Javascript">
$("tr").click(function() {
    $(this).toggleClass("rowActive");
});
</pre>
<pre lang="css">
/* CSS highlights clicked row */
.rowActive {
    border: 1px solid #333333;
    background-color: #999999;
}
</pre>
<h3>10. Building the DOM Dynamically</h3>
<pre lang="Javascript">
$("
<div/>").attr({id:"header", "class":"header"}).html("Welcome to my Site!").appendTo(document.body);
$("<img/>").attr("src", "images/logo.gif").appendTo("#header");
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.socialvitamin.com/2009/05/18/10-jquery-13-techniques-you-cant-live-without/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Random CSS themes give your Social Space a Design Twist</title>
		<link>http://www.socialvitamin.com/2009/04/11/random-css-themes-give-your-social-space-a-design-twist/</link>
		<comments>http://www.socialvitamin.com/2009/04/11/random-css-themes-give-your-social-space-a-design-twist/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 05:18:31 +0000</pubDate>
		<dc:creator>Michael D. Irizarry</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.socialvitamin.com/?p=105</guid>
		<description><![CDATA[Many sites are using this technique to give a fresh interface on every page the user visits, giving the illusion of a fast passed user experience. Sites like MTV, Hulu, [...]]]></description>
			<content:encoded><![CDATA[<p>Many sites are using this technique to give a fresh interface on every page the user visits, giving the illusion of a fast passed user experience. Sites like MTV, Hulu, MP3.com and many others use different techniques to change the sites layout either by changing the colors, backgrounds or just converting the site to a huge ad campaign. </p>
<p>I came up with a simple PHP script to Random your Themes. It checks for CSS files on a specified folder and randomizes it. You can also set the parameter (theme.php?file=theme.css) if you want to have a static version. Note: Security has been stripped for clarity, setup up the script with your own security.</p>
<p>PHP</p>
<pre lang="PHP">
<?php

// Themes Folder
$folder = './';

// File Type Default CSS
$fileTypes = array();
$fileTypes['css'] = 'text/css';

// File
$file = null;

// Sanity Check
if (substr($folder,-1) != '/') {
	$folder = $folder.'/';
}

// Request Param
if (isset($_GET['file'])) {
	$meta = pathinfo($_GET['file']);
	if (
	    isset( $fileTypes[ strtolower( $meta['extension'] ) ] ) &#038;&#038;
        file_exists( $folder.$meta['basename'] )
    ) {
		$file = $folder.$meta['basename'];
	}
} else {
	$fileList = array();

	if (is_dir($folder)) {
	    if ($handle = opendir($folder)) {
	        while (($file = readdir($handle)) !== false) {
				$file_info = pathinfo($file);
				if ( isset( $fileTypes[ strtolower( $file_info['extension'] ) ] ) ) {
					$fileList[] = $file;
				}
	        }
	        closedir($handle);
	    }
	}

	if (count($fileList) > 0) {
		$rnd = rand(0, count($fileList)-1);
		$file = $folder.$fileList[$rnd];
	}
}

// Header and Content
if ($file != null) {
	$meta = pathinfo($file);
	$contentType = 'Content-type: '.$fileTypes[ $meta['extension'] ];
	header ($contentType);
	readfile($file);
}
?>
</pre>
<p>USE</p>
<pre lang="html">
<link rel="stylesheet" href="theme.php" type="text/css" media="screen" />
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.socialvitamin.com/2009/04/11/random-css-themes-give-your-social-space-a-design-twist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Clear floats with overflow:auto;</title>
		<link>http://www.socialvitamin.com/2009/03/31/clear-floats-with-overflowauto/</link>
		<comments>http://www.socialvitamin.com/2009/03/31/clear-floats-with-overflowauto/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 18:19:05 +0000</pubDate>
		<dc:creator>Michael D. Irizarry</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[overflow]]></category>

		<guid isPermaLink="false">http://www.socialvitamin.com/?p=40</guid>
		<description><![CDATA[You have scattered the web found lots of different hacks (example: .clearfix) on how to take care of that nasty problem with your floats overlapping. When all you needed to [...]]]></description>
			<content:encoded><![CDATA[<p>You have scattered the web found lots of different hacks (example: <a href="http://www.webtoolkit.info/css-clearfix.html">.clearfix</a>) on how to take care of that nasty problem with your floats overlapping. When all you needed to do was use the overflow property. Using overflow:auto; on the outer div will fix this float problem. A few tweaks must be done for div&#8217;s at the bottom but it&#8217;s way better than hacking. Works for all Grade A Browsers. Note: For IE MAC use overflow: hidden; since it will always display the scrollbars.<span id="more-40"></span></p>
<p><strong>CSS</strong></p>
<pre lang="CSS">#doc {
	width: 100%;
	overflow:auto;
}
#left {
       width: 45%;
       float: left;
}
#right {
	width: 45%;
	float: right;
}</pre>
<p><strong>XHTML</strong></p>
<pre lang="HTML">
<div id="doc">
<div id="left">LEFT</div>
<div id="right">RIGHT</div>
</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.socialvitamin.com/2009/03/31/clear-floats-with-overflowauto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
