<?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>Allan Collins &#187; jQuery</title> <atom:link href="http://www.allancollins.net/category/jquery/feed/" rel="self" type="application/rss+xml" /><link>http://www.allancollins.net</link> <description>Official home of a Colorado Web Developer.</description> <lastBuildDate>Tue, 10 Aug 2010 15:59:20 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=abc</generator> <item><title>Rounded Corners: The Easy Way</title><link>http://www.allancollins.net/292/rounded-corners-the-easy-way/</link> <comments>http://www.allancollins.net/292/rounded-corners-the-easy-way/#comments</comments> <pubDate>Tue, 10 Mar 2009 14:00:50 +0000</pubDate> <dc:creator>Allan Collins</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[jQuery]]></category><guid isPermaLink="false">http://www.allancollins.net/?p=292</guid> <description><![CDATA[Easily transform blog comments, spice up a layout or just look cool by doing it.]]></description> <content:encoded><![CDATA[ <script type="text/javascript" src="http://www.allancollins.net/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script> <p>Easily transform blog comments, spice up a layout or just look cool by doing it.</p><p class="featurebox"> Thanks to the <a href="http://www.malsup.com/jquery/corner/">jQuery Corner</a> plugin, you can create a rounded rectangle just like this one. Easy. Simple. SWEEET!</p><p>Download the js file, along with jQuery and then set which elements get rounded.  That&#8217;s it.<br /><pre class="brush: xml">&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(document).ready(function() 
{
    jQuery(&quot;.featurebox&quot;).corner();
});
&lt;/script&gt;
&lt;div class=&quot;featurebox&quot;&gt;This is content within a rounded rectangle.  Pretty painless huh?&lt;/div&gt;</pre></p> ]]></content:encoded> <wfw:commentRss>http://www.allancollins.net/292/rounded-corners-the-easy-way/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to Create Buttons From Links</title><link>http://www.allancollins.net/224/how-to-create-buttons-from-links/</link> <comments>http://www.allancollins.net/224/how-to-create-buttons-from-links/#comments</comments> <pubDate>Sun, 08 Feb 2009 16:24:28 +0000</pubDate> <dc:creator>Allan Collins</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[jQuery]]></category><guid isPermaLink="false">http://www.allancollins.net/?p=224</guid> <description><![CDATA[Want to reinvent the button with a text link?  Check out this tutorial that utilizes jQuery.]]></description> <content:encoded><![CDATA[ <script type="text/javascript" src="http://www.allancollins.net/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script> <script type="text/javascript" src="http://www.allancollins.net/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJScript.js"></script> <p>Here&#8217;s a fun way to reinvent the button:</p><p>1. Let&#8217;s start with a simple anchor link:</p><p>&lt;a href=&#8221;#&#8221; class=&#8221;coolbutton&#8221;&gt;Click Here&lt;/a&gt;</p><p>2. By adding elements into the anchor tag and styling them with CSS, you can create a nice button from this anchor tag.</p><p><strong>DEMO:</strong><pre class="brush: js">jQuery(document).ready(function() {

	var linkText=jQuery(&quot;.coolbutton&quot;).html();
	jQuery(&quot;.coolbutton&quot;).html(&quot;&lt;b&gt;&lt;em&gt;&quot; + linkText + &quot;&lt;/em&gt;&lt;/b&gt;&lt;span&gt;&lt;/span&gt;&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;color&quot;,&quot;#000000&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;text-decoration&quot;,&quot;none&quot;);
	jQuery(&quot;.coolbutton b&quot;).css(&quot;font-weight&quot;,&quot;normal&quot;);
	jQuery(&quot;.coolbutton b *&quot;).css(&quot;font-style&quot;,&quot;normal&quot;);
	jQuery(&quot;.coolbutton b&quot;).css(&quot;display&quot;,&quot;block&quot;);
	jQuery(&quot;.coolbutton b&quot;).css(&quot;width&quot;,&quot;80px&quot;);	
	jQuery(&quot;.coolbutton b&quot;).css(&quot;position&quot;,&quot;absolute&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;display&quot;,&quot;block&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;border&quot;,&quot;1px solid #707070&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;width&quot;,&quot;80px&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;height&quot;,&quot;20px&quot;);
	jQuery(&quot;.coolbutton b&quot;).css(&quot;text-align&quot;,&quot;center&quot;);
	jQuery(&quot;.coolbutton b&quot;).css(&quot;padding-top&quot;,&quot;2px&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;background&quot;,&quot;#d4d4d4&quot;);
	jQuery(&quot;.coolbutton span&quot;).css(&quot;display&quot;,&quot;block&quot;);
	jQuery(&quot;.coolbutton span&quot;).css(&quot;height&quot;,&quot;10px&quot;);
	jQuery(&quot;.coolbutton span&quot;).css(&quot;background&quot;,&quot;#ececec&quot;);
	jQuery(&quot;.coolbutton *&quot;).css(&quot;cursor&quot;,&quot;default&quot;);
	
	jQuery(&quot;.coolbutton&quot;).css(&quot;-moz-border-radius&quot;,&quot;5px&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;-khtml-border-radius&quot;,&quot;5px&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;-webkit-border-radius&quot;,&quot;5px&quot;);
	jQuery(&quot;.coolbutton&quot;).css(&quot;border-radius&quot;,&quot;5px&quot;);	
	
	


	
	jQuery(&quot;.coolbutton&quot;).hover(function() {
		
		jQuery(this).css(&quot;border&quot;,&quot;1px solid #3c7fb1&quot;);
		jQuery(this).css(&quot;background&quot;,&quot;#bce5fc&quot;);
		jQuery(this).addClass(&quot;active&quot;);
		jQuery(&quot;.active span&quot;).css(&quot;background&quot;,&quot;#e6f5fd&quot;);
	},function() {
	jQuery(&quot;.active span&quot;).css(&quot;background&quot;,&quot;#ececec&quot;);
	jQuery(this).css(&quot;border&quot;,&quot;1px solid #707070&quot;);
	jQuery(this).css(&quot;background&quot;,&quot;#d4d4d4&quot;);
	jQuery(this).removeClass(&quot;active&quot;);
	});
	
	
	jQuery(&quot;.coolbutton&quot;).mousedown(function() {
		jQuery(this).css(&quot;border&quot;,&quot;1px solid #2c628b&quot;);
		jQuery(this).css(&quot;background&quot;,&quot;#86c6e8&quot;);
		jQuery(this).addClass(&quot;active&quot;);
		jQuery(&quot;.active span&quot;).css(&quot;background&quot;,&quot;#d8eefa&quot;);
		jQuery(&quot;.active b *&quot;).css(&quot;border&quot;,&quot;1px dotted #202020&quot;);
		jQuery(&quot;.active b *&quot;).css(&quot;padding-left&quot;,&quot;3px&quot;);
		
		
		
		jQuery(&quot;.coolbutton&quot;).mouseup(function() {
	jQuery(this).css(&quot;border&quot;,&quot;1px solid #3c7fb1&quot;);
		jQuery(this).css(&quot;background&quot;,&quot;#bce5fc&quot;);
		jQuery(this).addClass(&quot;active&quot;);
		jQuery(&quot;.active span&quot;).css(&quot;background&quot;,&quot;#e6f5fd&quot;);
	jQuery(&quot;.active b *&quot;).css(&quot;border&quot;,&quot;none&quot;);
		jQuery(&quot;.active b *&quot;).css(&quot;padding-left&quot;,&quot;0&quot;);
	});
	
	});
	
	jQuery(&quot;.coolbutton&quot;).click(function(){
	alert(&quot;Hello&quot;);
	return false;
	});
});</pre></p> ]]></content:encoded> <wfw:commentRss>http://www.allancollins.net/224/how-to-create-buttons-from-links/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Add a Cool Color Effect to Link Hovers</title><link>http://www.allancollins.net/141/add-a-cool-color-effect-to-link-hovers/</link> <comments>http://www.allancollins.net/141/add-a-cool-color-effect-to-link-hovers/#comments</comments> <pubDate>Sun, 04 Jan 2009 22:39:28 +0000</pubDate> <dc:creator>Allan Collins</dc:creator> <category><![CDATA[jQuery]]></category><guid isPermaLink="false">http://www.allancollins.net/?p=141</guid> <description><![CDATA[Ever want to have your links fade from one color to the next? On a standard link hover, you get two colors: the normal link color and the hover color. But thanks to jQuery and the Color Animations plugin, you can cross-fade to colors.]]></description> <content:encoded><![CDATA[ <script type="text/javascript" src="http://www.allancollins.net/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script> <script type="text/javascript" src="http://www.allancollins.net/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJScript.js"></script> <p>Ever want to have your links fade from one color to the next?</p><p>On a standard link hover, you get two colors: the normal link color and the hover color.</p><p>But thanks to jQuery and the <a href="http://plugins.jquery.com/project/color">Color Animations plugin</a>, you can cross-fade to colors.</p><p><pre class="brush: js">$(function() {
	$(&quot;a&quot;).hover(
	
		function () {
			if ($(this).is(&quot;:animated&quot;)) {
				$(this).stop().animate({color:&quot;#ff0000&quot;}, 500);
			}else{
				$(this).animate({color:&quot;#ff0000&quot;}, 1500);
			}
		},
		
		function () {
		if ($(this).is(&quot;:animated&quot;)) {
			$(this).stop().animate({color:&quot;#0000ff&quot;}, 500);
		}else{
			$(this).animate({color:'#0000ff'}, 1500);
		}
		
		});
			
});</pre></p> ]]></content:encoded> <wfw:commentRss>http://www.allancollins.net/141/add-a-cool-color-effect-to-link-hovers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 14/34 queries in 0.051 seconds using disk

Served from: www.allancollins.net @ 2010-09-06 13:29:31 -->