<?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>Shane Strong &#187; jQuery</title>
	<atom:link href="http://www.shanestrong.com/tag/jquery/feed" rel="self" type="application/rss+xml" />
	<link>http://www.shanestrong.com</link>
	<description>Lansing WordPress Web Developer Search Engine Optimization Website Consultant Theme Developer Magento Developer Lansing Michigan</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:45:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>jQuery Popup</title>
		<link>http://www.shanestrong.com/web-development/jquery-popup</link>
		<comments>http://www.shanestrong.com/web-development/jquery-popup#comments</comments>
		<pubDate>Thu, 19 Jan 2012 06:03:52 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Popup]]></category>

		<guid isPermaLink="false">http://www.shanestrong.com/?p=1371</guid>
		<description><![CDATA[jQuery is not a new technology anymore but it is not an old one either. Most new website are using some form of jQuery. There are some things that you can do with jQuery that are simple but can make your website stand out. One of the ways that you can spread news or try [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery is not a new technology anymore but it is not an old one either.  Most new website are using some form of jQuery.  There are some things that you can do with jQuery that are simple but can make your website stand out.  One of the ways that you can spread news or try to get people to interact on your site more is with a popup.  Now some people might think these are annoying but can really help build more interaction.  Popups don&#8217;t have to be annoying, they can be helpfully and creative.  The thing that made popups annoying when they first came out was that people played music with them and they popped up automatically.  Well that is annoying but what if you use it for a contact form or something for people to signup for feeds.  There are a ton of things that you can use a popup for and with jQuery you will get something that is for the most part cross browser compliant.  For this tutorial you will need to know html, jQuery, and css.  So lets get started.</p>
<h3>Step One &#8211; Create You HTML Template</h3>
<p>One of the first things you will need for your html template is the jquery library script or an equivalent script.  The <a target="_blank" href="http://code.google.com/apis/libraries/devguide.html#jquery">google hosted jquery script</a> or the jquery hosted latest script would work.  I prefer to use the latest jquery script.  The next thing that you will need to add is the css popup file and the js popup file.  These will look like this in your head area.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">   &lt;link rel=&quot;stylesheet&quot; href=&quot;PathToFile/popup.css&quot; type=&quot;text/css&quot; /&gt;
   &lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
   &lt;script type=&quot;text/javascript&quot; src=&quot;PathToFile/popup.js&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>After you add these all that you will have to do is add the code to create the popup.  Well you will have to first decide if you want to use a button or a link.  Both of these will work all that you have to do is add the class button to them.  Then you will have to create the popup container and the contents of the popup.  This should look something link this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">   &lt;div class=&quot;button&quot;&gt;&lt;input type=&quot;submit&quot; value=&quot;Press This&quot; /&gt;&lt;/div&gt;
   &lt;div class=&quot;popupContent&quot;&gt;
      &lt;a class=&quot;popupClose&quot;&gt;x&lt;/a&gt;
      &lt;h1&gt;This is a title for a popup!&lt;/h1&gt;
      &lt;p&gt;What you want in the popup&lt;/p&gt;
   &lt;/div&gt;
   &lt;div class=&quot;backgroundPopup&quot;&gt;&lt;/div&gt;</pre></div></div>

<p>That is all for the html part.  Now you will have to style the popup with the popup.css file.</p>
<h3>Step Two &#8211; Design Your Popup With CSS</h3>
<p>Inside of the popup.css file there are all of the classes that you will need to have setup.  Hear is a list of the classes that you will need (popupContent, popupClose, and backgroundPopup).  These classes will have to be coded like below:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">   .backgroundPopup<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
	_position<span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* hack for internet explorer 6*/</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">9998</span><span style="color: #00AA00;">;</span>
   <span style="color: #00AA00;">&#125;</span>
   //You can style the <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">,</span> and <span style="color: #000000; font-weight: bold;">height</span> of this how you want
   .popupContent<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
	_position<span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* hack for internet explorer 6*/</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">35em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">9999</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.3em</span><span style="color: #00AA00;">;</span>
   <span style="color: #00AA00;">&#125;</span>
   //Style this how you want
   .popupClose<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.4em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span><span style="color: #933;">0.5em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">0.2em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">700</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
   <span style="color: #00AA00;">&#125;</span>
   <span style="color: #6666ff;">.popupClose</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<h3>Step Three &#8211; Build The jQuery Popup</h3>
<p>Now that you hopefully have a sweet designed look for your popup we have to add the script to control the popup.  All that you have to do for this is all the code below to your popup.js file.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">var popupStatus = 0;
&nbsp;
function loadPopup(){
   //Will only be loaded if the status is 0
   if(popupStatus==0){
      $(&quot;.backgroundPopup&quot;).css({&quot;opacity&quot;: &quot;0.8&quot;});
      $(&quot;.backgroundPopup&quot;).fadeIn(&quot;slow&quot;);
      $(&quot;.popupContent&quot;).fadeIn(&quot;slow&quot;);
      popupStatus = 1;
   }
}
&nbsp;
//This will disable the popup when needed
function disablePopup(){
   //Will only disable if status is 1
   if(popupStatus==1){
      $(&quot;.backgroundPopup&quot;).fadeOut(&quot;slow&quot;);
      $(&quot;.popupContent&quot;).fadeOut(&quot;slow&quot;);
      popupStatus = 0;
   }
}
&nbsp;
//Centers the popup to your window size 
function centerPopup(){
   var windowWidth = document.documentElement.clientWidth;
   var windowHeight = document.documentElement.clientHeight;
   var popupHeight = $(&quot;.popupContent&quot;).height();
   var popupWidth = $(&quot;.popupContent&quot;).width();
   $(&quot;.popupContent&quot;).css({
      &quot;position&quot;: &quot;absolute&quot;,
      &quot;top&quot;: windowHeight/2-popupHeight/2,
      &quot;left&quot;: windowWidth/2-popupWidth/2
   });
   //this is needed for ie6
   $(&quot;.backgroundPopup&quot;).css({ &quot;height&quot;: windowHeight });
}
&nbsp;
//Click event controller
$(document).ready(function(){
   //Open the popup and center
   $(&quot;.button&quot;).click(function(){
      centerPopup();
      loadPopup();
   });
   //Close popup by clicking the x
   $(&quot;.popupClose&quot;).click(function(){ disablePopup(); });
   //Close popup by clicking outside the box
   $(&quot;.backgroundPopup&quot;).click(function(){ disablePopup(); });
   //Close popup by clicking escape
   $(document).keypress(function(e){
      if(e.keyCode==27 &amp;&amp; popupStatus==1){
         disablePopup();
      }
   });
});</pre></div></div>

<p>Now if you copy that code and add it to your popup.js file everything will work.  This script declares the width of your browser and determines where to put the popup automatically.  It also declares the closing abilities.  There are three of these you can click the x, push escape, or click outside the popup.  There is nothing left your popup should be working great.  Now this is a really simple jQuery popup.  There are tons of popups out there and tons of ways to do these but most aren&#8217;t this easy and light weight on your browser.  If you would like to see a demo of this in action you can <a href="http://www.shanestrong.com/jquery/popup/popup.htm" title="Demo jQuery Popup">click here</a> or you can download this demo and mess around with this your self.</p>
<a class="downloadlink" href="http://www.shanestrong.com/downloads80" title="Version1.0 downloaded 22 times" >jQuery Popup (22)</a>
<p>Anyone that might use this and find some changes that make it better I would love to see these changes and put them up on the site with you getting credit.  Please contact us.</p>
<!-- Start Sociable --><div class="sociable"><div class="sociable_tagline">Spread and Share</div><ul class='clearfix'><li><a title="Twitter" class="option1_32" style="background-position:-288px -32px" rel="nofollow" target="_blank" href="http://twitter.com/intent/tweet?text=jQuery%20Popup%20-%20http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup%20(via%20@sociablesite)"></a></li><li><a title="Facebook" class="option1_32" style="background-position:-96px 0px" rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;t=jQuery%20Popup"></a></li><li><a title="StumbleUpon" class="option1_32" style="background-position:-224px -32px" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&title=jQuery%20Popup"></a></li><li><a title="LinkedIn" class="option1_32" style="background-position:-288px 0px" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup&amp;source=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan&amp;summary=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li><a title="Delicious" class="option1_32" style="background-position:-32px 0px" rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup&amp;notes=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li><a title="Google Bookmarks" class="option1_32" style="background-position:-192px 0px" rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup&amp;annotation=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li><a title="Digg" class="option1_32" style="background-position:-64px 0px" rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup&amp;bodytext=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li><a title="Reddit" class="option1_32" style="background-position:-128px -32px" rel="nofollow" target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup"></a></li><li><a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById('sociable-post-1371'), event, 'post-1371')" onMouseOver="more(this,'post-1371')"><img style='margin-top:9px' src='http://www.shanestrong.com/wp-content/plugins/sociable/images/more.png'></a></li></ul><div onMouseout="fixOnMouseOut(this,event,'post-1371')" id="sociable-post-1371" style="display:none;">   











    <div style="top: auto; left: auto; display: block;" id="sociable">























		<div class="popup">











			<div class="content">











				<ul><li style="heigth:32px;width:32px"><a title="Myspace" class="option1_32" style="background-position:0px -32px" rel="nofollow" target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;t=jQuery%20Popup"></a></li><li style="heigth:32px;width:32px"><a title="HackerNews" class="option1_32" style="background-position:-256px 0px" rel="nofollow" target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;t=jQuery%20Popup"></a></li><li style="heigth:32px;width:32px"><a title="MSNReporter" class="option1_32" style="background-position:-352px 0px" rel="nofollow" target="_blank" href="http://reporter.es.msn.com/?fn=contribute&amp;Title=jQuery%20Popup&amp;URL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;cat_id=6&amp;tag_id=31&amp;Remark=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li style="heigth:32px;width:32px"><a title="BlinkList" class="option1_32" style="background-position:0px 0px" rel="nofollow" target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;Title=jQuery%20Popup"></a></li><li style="heigth:32px;width:32px"><a title="Sphinn" class="option1_32" style="background-position:-192px -32px" rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup"></a></li><li style="heigth:32px;width:32px"><a title="Posterous" class="option1_32" style="background-position:-64px -32px" rel="nofollow" target="_blank" href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup&amp;selection=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li style="heigth:32px;width:32px"><a title="Tumblr" class="option1_32" style="background-position:-256px -32px" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;t=jQuery%20Popup&amp;s=jQuery%20is%20not%20a%20new%20technology%20anymore%20but%20it%20is%20not%20an%20old%20one%20either.%20%20Most%20new%20website%20are%20using%20some%20form%20of%20jQuery.%20%20There%20are%20some%20things%20that%20you%20can%20do%20with%20jQuery%20that%20are%20simple%20but%20can%20make%20your%20website%20stand%20out.%20%20One%20of%20the%20ways%20that%20you"></a></li><li style="heigth:32px;width:32px"><a title="email" class="option1_32" style="background-position:-160px 0px" rel="nofollow" target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&to&su=jQuery%20Popup&body=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&ui=2&tf=1&shva=1"></a></li><li style="heigth:32px;width:32px"><a title="Google Reader" class="option1_32" style="background-position:-224px 0px" rel="nofollow" target="_blank" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup&amp;srcURL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;srcTitle=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan"></a></li><li style="heigth:32px;width:32px"><a class="option1_32" style="cursor:pointer;background-position:-128px 0px" rel="nofollow" title="Add to favorites - doesn't work in Chrome"  onClick="javascript:AddToFavorites();"></a></li></ul>			











			</div>        











		  <a style="cursor:pointer" onclick="hide_sociable('post-1371',true)" class="close">























		  <img onclick="hide_sociable('post-1371',true)" title="close" src="http://www.shanestrong.com/wp-content/plugins/sociable/images/closelabel.png">











		  </a>











		</div>











	</div> 











  </div></div><div class='sociable' style='float:none'><ul class='clearfix'><li id="Twitter_Counter"><a href="https://twitter.com/share" data-text="jQuery Popup - http://www.shanestrong.com/web-development/jquery-popup (via #sociablesite)" data-url="http://www.shanestrong.com/web-development/jquery-popup" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li><li id="Facebook_Counter"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.shanestrong.com/web-development/jquery-popup&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe></li><li id="Digg_Counter"><script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-popup&amp;title=jQuery%20Popup'  class='DiggThisButton DiggCompact'></a></li><li id="StumbleUpon_Counter"><script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.shanestrong.com/web-development/jquery-popup"></script></li><li id="Google_p"><g:plusone annotation="bubble" href="http://www.shanestrong.com/web-development/jquery-popup" size="medium"></g:plusone></li><li id="LinkedIn_Counter"><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="http://www.shanestrong.com/web-development/jquery-popup" data-counter="right"></script></li></ul></div><!-- End Sociable --><img src="http://www.shanestrong.com/?ak_action=api_record_view&id=1371&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shanestrong.com/web-development/jquery-popup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Cool Corners</title>
		<link>http://www.shanestrong.com/web-development/jquery-cool-corners</link>
		<comments>http://www.shanestrong.com/web-development/jquery-cool-corners#comments</comments>
		<pubDate>Wed, 09 Feb 2011 09:45:30 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jQuery Cool Corners]]></category>
		<category><![CDATA[jQuery Corners]]></category>
		<category><![CDATA[jQuery Rounded Corners]]></category>

		<guid isPermaLink="false">http://www.shanestrong.com/?p=1355</guid>
		<description><![CDATA[With the advancements in the web industry designers are getting more creative and CSS is having a hard time keeping up with some stuff. Well almost anything that you would like to do can be done with jQuery. For instance one of my favorite thing to do is create some great looking corners. Well CSS [...]]]></description>
			<content:encoded><![CDATA[<p>With the advancements in the web industry designers are getting more creative and CSS is having a hard time keeping up with some stuff.  Well almost anything that you would like to do can be done with jQuery.  For instance one of my favorite thing to do is create some great looking corners.  Well CSS has some different things that you can do with corners but a lot of these are limited to certain browsers.  Well Dave Methvin created a great jQuery script that handles many different kinds of cool corners.  With these corners being rendered in jQuery it makes them browser complaint across every major browser and most all up-to-date browsers.</p>
<h3>How To Implement Cool Corners</h3>
<p>First of all you must pull in jQuery into your website.  The best way of doing this is by linking to http://code.jquery.com/jquery-svn.js in your header or footer link this:</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">//jQuery SVN Updated Version
&lt;script src=&quot;http://code.jquery.com/jquery-svn.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>The next thing that you have to do is pull in Dave Methvin corners script.  This can be done by downloading the script from <a target="_blank" href="http://methvin.com/corner/jquery.corner.js">Here</a>.  This also needs to be added to the header or the footer like this.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">//Dave Methvin's
&lt;script src=&quot;Location Of File On Your Server&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></div></div>

<h3>Adding Final Code</h3>
<p>In order to get these amazing different corners to work on your web page all you need to do is call out the classes of the spots you want to activate the corners.  Also you need to decide which of the many types of corners you would like to use.  Yes I said MANY TYPES.  Dave Methvin created this script with many different kinds of corners you can choose from.  For Instance Rounded, Beveled, Notched, Bite, Dog-ear, Sculpt, Sharp and many more.  You can find all of the corner types at <a target="_blank" href="http://methvin.com/corner/jq-corner-demo.html">jQuery Corner Demo</a>.  Now back to the code, once you have decide on the type you need to add this after the Methvin&#8217;s script.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">//Some Different Examples
&lt;script type=&quot;text/javascript&quot;&gt;
	jQuery(document).ready(function($) {
		$(&quot;.YOUR CLASS&quot;).corner(&quot;10px&quot;);
		$(&quot;.YOUR CLASS&quot;).corner(&quot;bevel 10px&quot;);
		$(&quot;.YOUR CLASS&quot;).corner(&quot;notch 10px&quot;);
		$(&quot;.YOUR CLASS&quot;).corner(&quot;cool 10px&quot;);
		$(&quot;.YOUR CLASS&quot;).corner(&quot;curl 10px&quot;);
		$(&quot;.YOUR CLASS&quot;).corner(&quot;sculpt 10px&quot;);
	});
&lt;/script&gt;</pre></div></div>

<p>Here is a download able and viewable demo of the script in action that I have created.  This demo involves all of the above examples.</p>
<p>jQuery Cool Corners: <a href="http://www.shanestrong.com/jquery/cool-corners/coolcorners.htm" title="jQuery Cool Corners Demo">Cool Corners Demo</a></p>
<p>Download: <a class="downloadlink" href="http://www.shanestrong.com/downloads79" title="Version1.0 downloaded 12 times" >jQuery Cool Corners (12)</a></p>
<p>For even more about this great script I would read up on <a target="_blank" href="http://methvin.com/corner/">Methvin&#8217;s Gallery</a> and also on <a target="_blank" href="http://methvin.com/corner/jq-corner-demo.html">Methvin&#8217;s Demo</a>.</p>
<h3>Development And Consulting</h3>
<p>Contact Shane Strong for any of your web development, WordPress theme development, Magento development, PHP, and jQuery needs.  You can view my <a href="http://www.shanestrong.com/portfolio">portfolio</a> for some of my work.</p>
<!-- Start Sociable --><div class="sociable"><div class="sociable_tagline">Spread and Share</div><ul class='clearfix'><li><a title="Twitter" class="option1_32" style="background-position:-288px -32px" rel="nofollow" target="_blank" href="http://twitter.com/intent/tweet?text=jQuery%20Cool%20Corners%20-%20http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners%20(via%20@sociablesite)"></a></li><li><a title="Facebook" class="option1_32" style="background-position:-96px 0px" rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;t=jQuery%20Cool%20Corners"></a></li><li><a title="StumbleUpon" class="option1_32" style="background-position:-224px -32px" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&title=jQuery%20Cool%20Corners"></a></li><li><a title="LinkedIn" class="option1_32" style="background-position:-288px 0px" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners&amp;source=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan&amp;summary=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li><a title="Delicious" class="option1_32" style="background-position:-32px 0px" rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners&amp;notes=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li><a title="Google Bookmarks" class="option1_32" style="background-position:-192px 0px" rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners&amp;annotation=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li><a title="Digg" class="option1_32" style="background-position:-64px 0px" rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners&amp;bodytext=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li><a title="Reddit" class="option1_32" style="background-position:-128px -32px" rel="nofollow" target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners"></a></li><li><a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById('sociable-post-1355'), event, 'post-1355')" onMouseOver="more(this,'post-1355')"><img style='margin-top:9px' src='http://www.shanestrong.com/wp-content/plugins/sociable/images/more.png'></a></li></ul><div onMouseout="fixOnMouseOut(this,event,'post-1355')" id="sociable-post-1355" style="display:none;">   











    <div style="top: auto; left: auto; display: block;" id="sociable">























		<div class="popup">











			<div class="content">











				<ul><li style="heigth:32px;width:32px"><a title="Myspace" class="option1_32" style="background-position:0px -32px" rel="nofollow" target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;t=jQuery%20Cool%20Corners"></a></li><li style="heigth:32px;width:32px"><a title="HackerNews" class="option1_32" style="background-position:-256px 0px" rel="nofollow" target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;t=jQuery%20Cool%20Corners"></a></li><li style="heigth:32px;width:32px"><a title="MSNReporter" class="option1_32" style="background-position:-352px 0px" rel="nofollow" target="_blank" href="http://reporter.es.msn.com/?fn=contribute&amp;Title=jQuery%20Cool%20Corners&amp;URL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;cat_id=6&amp;tag_id=31&amp;Remark=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li style="heigth:32px;width:32px"><a title="BlinkList" class="option1_32" style="background-position:0px 0px" rel="nofollow" target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;Title=jQuery%20Cool%20Corners"></a></li><li style="heigth:32px;width:32px"><a title="Sphinn" class="option1_32" style="background-position:-192px -32px" rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners"></a></li><li style="heigth:32px;width:32px"><a title="Posterous" class="option1_32" style="background-position:-64px -32px" rel="nofollow" target="_blank" href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners&amp;selection=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li style="heigth:32px;width:32px"><a title="Tumblr" class="option1_32" style="background-position:-256px -32px" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;t=jQuery%20Cool%20Corners&amp;s=With%20the%20advancements%20in%20the%20web%20industry%20designers%20are%20getting%20more%20creative%20and%20CSS%20is%20having%20a%20hard%20time%20keeping%20up%20with%20some%20stuff.%20%20Well%20almost%20anything%20that%20you%20would%20like%20to%20do%20can%20be%20done%20with%20jQuery.%20%20For%20instance%20one%20of%20my%20favorite%20thing%20to"></a></li><li style="heigth:32px;width:32px"><a title="email" class="option1_32" style="background-position:-160px 0px" rel="nofollow" target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&to&su=jQuery%20Cool%20Corners&body=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&ui=2&tf=1&shva=1"></a></li><li style="heigth:32px;width:32px"><a title="Google Reader" class="option1_32" style="background-position:-224px 0px" rel="nofollow" target="_blank" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners&amp;srcURL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;srcTitle=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan"></a></li><li style="heigth:32px;width:32px"><a class="option1_32" style="cursor:pointer;background-position:-128px 0px" rel="nofollow" title="Add to favorites - doesn't work in Chrome"  onClick="javascript:AddToFavorites();"></a></li></ul>			











			</div>        











		  <a style="cursor:pointer" onclick="hide_sociable('post-1355',true)" class="close">























		  <img onclick="hide_sociable('post-1355',true)" title="close" src="http://www.shanestrong.com/wp-content/plugins/sociable/images/closelabel.png">











		  </a>











		</div>











	</div> 











  </div></div><div class='sociable' style='float:none'><ul class='clearfix'><li id="Twitter_Counter"><a href="https://twitter.com/share" data-text="jQuery Cool Corners - http://www.shanestrong.com/web-development/jquery-cool-corners (via #sociablesite)" data-url="http://www.shanestrong.com/web-development/jquery-cool-corners" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li><li id="Facebook_Counter"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.shanestrong.com/web-development/jquery-cool-corners&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe></li><li id="Digg_Counter"><script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-development%2Fjquery-cool-corners&amp;title=jQuery%20Cool%20Corners'  class='DiggThisButton DiggCompact'></a></li><li id="StumbleUpon_Counter"><script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.shanestrong.com/web-development/jquery-cool-corners"></script></li><li id="Google_p"><g:plusone annotation="bubble" href="http://www.shanestrong.com/web-development/jquery-cool-corners" size="medium"></g:plusone></li><li id="LinkedIn_Counter"><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="http://www.shanestrong.com/web-development/jquery-cool-corners" data-counter="right"></script></li></ul></div><!-- End Sociable --><img src="http://www.shanestrong.com/?ak_action=api_record_view&id=1355&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shanestrong.com/web-development/jquery-cool-corners/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Corner Page Peel</title>
		<link>http://www.shanestrong.com/web-design/jquery-corner-page-peel</link>
		<comments>http://www.shanestrong.com/web-design/jquery-corner-page-peel#comments</comments>
		<pubDate>Sat, 06 Feb 2010 08:39:50 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[jQuery Peel]]></category>
		<category><![CDATA[Shane]]></category>
		<category><![CDATA[Simple jQuery]]></category>

		<guid isPermaLink="false">http://www.shanestrong.com/?p=1310</guid>
		<description><![CDATA[There are many different ways to make your RSS Icon jump out at people. Well why not have it peel at people. You have seen those ads that sites have in the upper right corner of there site that when you hover over them they just peel away. Well some people might think that must [...]]]></description>
			<content:encoded><![CDATA[<p>There are many different ways to make your RSS Icon jump out at people.  Well why not have it peel at people.  You have seen those ads that sites have in the upper right corner of there site that when you hover over them they just peel away.  Well some people might think that must be flash at work or something that is so advanced I can never learn it.  Well to let everyone know yes you can learn it and no it is not hard.  I am sure that you could make a peel away corner with flash and I bet it would look good.  But, I also bet that it would take a couple hours to create and then a few more to implement.  Well with some jQuery and CSS you can create a peel away corner in about 20-30mins.  All that you need to know for this is how to copy some code into your head and header area of your website.  I am going to break down exactly what you need to do in 3 easy steps.  If you would like to download the end product you can find it at the bottom of this tutorial.</p>
<h3>Add Your jQuery Scripts</h3>
<p>We are going to use Google&#8217;s AJAX Library to add our jQuery library to our header.  You may ask why we would do this well including the jQuery library from a external source will make less stress on your server and we all know that Google&#8217;s servers can handle the stress.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">&lt;head&gt;
//Google Hosted
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
//Your Script
&lt;script type=&quot;text/javascript&quot;&gt;
   jQuery(document).ready(function($) {
      $(&quot;.cornerpeel&quot;).hover(function() { //Hover Over
         $(&quot;.cornerpeel img , .message&quot;).stop()
	 .animate({ //Expand the Message and the Hover Image
	    width: '138px',
	    height: '138px'
	 }, 600);
      } , function() {
         $(&quot;.cornerpeel img&quot;).stop() //Hover Out Go Back To Original
	 .animate({
	    width: '50px',
	    height: '50px'
	 }, 200);
	 $(&quot;.message&quot;).stop() //Hover Out Go Back To Original
	 .animate({
            width: '50px',
	    height: '50px'
	 }, 180); //This should be a tad faster than the image because IE is known to glitch
      });
   });
&lt;/script&gt;
&lt;/head&gt;</pre></div></div>

<h3>Create Your Styles</h3>
<p>These are your styles and can be changed up depending on where your image is and what size you want to start out with.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.cornerpeel</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.cornerpeel</span> img <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">101</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.cornerpeel</span> <span style="color: #6666ff;">.message</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fffcf9</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">http://www.shanestrong.com/jQuery/cornerpeel/rss.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h3>Create Your Corner Peice</h3>
<p>This is were you create your hoverable corner piece.  This will be placed somewhere in your header area or right inside your body tag.</p>

<div class="wp_syntax"><div class="code"><pre class="htm" style="font-family:monospace;">&lt;div class=&quot;cornerpeel&quot;&gt;
   &lt;a href=&quot;http://feeds.feedburner.com/ShaneStrong&quot;&gt;
      &lt;img src=&quot;http://www.shanestrong.com/jQuery/cornerpeel/corner_img.png&quot; alt=&quot;&quot; /&gt;
      &lt;span class=&quot;message&quot;&gt;Subscribe To My Feed&lt;/span&gt;
   &lt;/a&gt;
&lt;/div&gt;</pre></div></div>

<h3>Your Finished</h3>
<p>Well that was it, that is all that you need to create your self a corner peel.  If you would like to see this in action you can download my script at the bottom.  There is a ton of things that you can do with jQuery that can make your site seem more flashy without having to find a flash developer.  jQuery is one of the fastest growing languages around.  If you have any tutorials that you would like to publish on my site please go to my contact page.</p>
<p>jQuery Corner Peel: <a target="_blank" href="/jquery/corner-peel/cornerpeel.htm" title="Corner Page Peel">Corner Peel Trial</a></p>
<p>Download: <a class="downloadlink" href="http://www.shanestrong.com/downloads74" title="Version1.0 downloaded 1262 times" >jQuery Corner Peel (1262)</a></p>
<h3>Website Design , Development, and SEO Marketing</h3>
<p>If by chance you are in need of any web design, web development, search engine optimization, or marketing done to one of your sites you can get in contact with me or you can contact Chosen.  Chosen is a Lansing based Web Development, Web Design, Web Hosting, and Web Marketing firm.  We are a small business but are growing in the Lansing Area for our Web Design and Development skills.  We have done work for clients and companies. We prefer client work but we also take contract work.  We have worked with most of the biggest web companies in the Lansing Area and all the way out to California.  We would love to hear from you.</p>
<h3>Sponsors</h3>
<p>Start saving on <a target="_blank" href="http://blog.psprint.com">printing services</a> today. Visit our website to learn more about <a target="_blank" href="http://www.psprint.com/booklets">booklet printing</a> today.</p>
<!-- Start Sociable --><div class="sociable"><div class="sociable_tagline">Spread and Share</div><ul class='clearfix'><li><a title="Twitter" class="option1_32" style="background-position:-288px -32px" rel="nofollow" target="_blank" href="http://twitter.com/intent/tweet?text=jQuery%20Corner%20Page%20Peel%20-%20http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel%20(via%20@sociablesite)"></a></li><li><a title="Facebook" class="option1_32" style="background-position:-96px 0px" rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;t=jQuery%20Corner%20Page%20Peel"></a></li><li><a title="StumbleUpon" class="option1_32" style="background-position:-224px -32px" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&title=jQuery%20Corner%20Page%20Peel"></a></li><li><a title="LinkedIn" class="option1_32" style="background-position:-288px 0px" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel&amp;source=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan&amp;summary=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li><a title="Delicious" class="option1_32" style="background-position:-32px 0px" rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel&amp;notes=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li><a title="Google Bookmarks" class="option1_32" style="background-position:-192px 0px" rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel&amp;annotation=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li><a title="Digg" class="option1_32" style="background-position:-64px 0px" rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel&amp;bodytext=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li><a title="Reddit" class="option1_32" style="background-position:-128px -32px" rel="nofollow" target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel"></a></li><li><a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById('sociable-post-1310'), event, 'post-1310')" onMouseOver="more(this,'post-1310')"><img style='margin-top:9px' src='http://www.shanestrong.com/wp-content/plugins/sociable/images/more.png'></a></li></ul><div onMouseout="fixOnMouseOut(this,event,'post-1310')" id="sociable-post-1310" style="display:none;">   











    <div style="top: auto; left: auto; display: block;" id="sociable">























		<div class="popup">











			<div class="content">











				<ul><li style="heigth:32px;width:32px"><a title="Myspace" class="option1_32" style="background-position:0px -32px" rel="nofollow" target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;t=jQuery%20Corner%20Page%20Peel"></a></li><li style="heigth:32px;width:32px"><a title="HackerNews" class="option1_32" style="background-position:-256px 0px" rel="nofollow" target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;t=jQuery%20Corner%20Page%20Peel"></a></li><li style="heigth:32px;width:32px"><a title="MSNReporter" class="option1_32" style="background-position:-352px 0px" rel="nofollow" target="_blank" href="http://reporter.es.msn.com/?fn=contribute&amp;Title=jQuery%20Corner%20Page%20Peel&amp;URL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;cat_id=6&amp;tag_id=31&amp;Remark=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li style="heigth:32px;width:32px"><a title="BlinkList" class="option1_32" style="background-position:0px 0px" rel="nofollow" target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;Title=jQuery%20Corner%20Page%20Peel"></a></li><li style="heigth:32px;width:32px"><a title="Sphinn" class="option1_32" style="background-position:-192px -32px" rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel"></a></li><li style="heigth:32px;width:32px"><a title="Posterous" class="option1_32" style="background-position:-64px -32px" rel="nofollow" target="_blank" href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel&amp;selection=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li style="heigth:32px;width:32px"><a title="Tumblr" class="option1_32" style="background-position:-256px -32px" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;t=jQuery%20Corner%20Page%20Peel&amp;s=There%20are%20many%20different%20ways%20to%20make%20your%20RSS%20Icon%20jump%20out%20at%20people.%20%20Well%20why%20not%20have%20it%20peel%20at%20people.%20%20You%20have%20seen%20those%20ads%20that%20sites%20have%20in%20the%20upper%20right%20corner%20of%20there%20site%20that%20when%20you%20hover%20over%20them%20they%20just%20peel%20away.%20%20Well%20so"></a></li><li style="heigth:32px;width:32px"><a title="email" class="option1_32" style="background-position:-160px 0px" rel="nofollow" target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&to&su=jQuery%20Corner%20Page%20Peel&body=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&ui=2&tf=1&shva=1"></a></li><li style="heigth:32px;width:32px"><a title="Google Reader" class="option1_32" style="background-position:-224px 0px" rel="nofollow" target="_blank" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel&amp;srcURL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;srcTitle=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan"></a></li><li style="heigth:32px;width:32px"><a class="option1_32" style="cursor:pointer;background-position:-128px 0px" rel="nofollow" title="Add to favorites - doesn't work in Chrome"  onClick="javascript:AddToFavorites();"></a></li></ul>			











			</div>        











		  <a style="cursor:pointer" onclick="hide_sociable('post-1310',true)" class="close">























		  <img onclick="hide_sociable('post-1310',true)" title="close" src="http://www.shanestrong.com/wp-content/plugins/sociable/images/closelabel.png">











		  </a>











		</div>











	</div> 











  </div></div><div class='sociable' style='float:none'><ul class='clearfix'><li id="Twitter_Counter"><a href="https://twitter.com/share" data-text="jQuery Corner Page Peel - http://www.shanestrong.com/web-design/jquery-corner-page-peel (via #sociablesite)" data-url="http://www.shanestrong.com/web-design/jquery-corner-page-peel" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li><li id="Facebook_Counter"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.shanestrong.com/web-design/jquery-corner-page-peel&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe></li><li id="Digg_Counter"><script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-corner-page-peel&amp;title=jQuery%20Corner%20Page%20Peel'  class='DiggThisButton DiggCompact'></a></li><li id="StumbleUpon_Counter"><script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.shanestrong.com/web-design/jquery-corner-page-peel"></script></li><li id="Google_p"><g:plusone annotation="bubble" href="http://www.shanestrong.com/web-design/jquery-corner-page-peel" size="medium"></g:plusone></li><li id="LinkedIn_Counter"><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="http://www.shanestrong.com/web-design/jquery-corner-page-peel" data-counter="right"></script></li></ul></div><!-- End Sociable --><img src="http://www.shanestrong.com/?ak_action=api_record_view&id=1310&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shanestrong.com/web-design/jquery-corner-page-peel/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery Accordion</title>
		<link>http://www.shanestrong.com/web-design/jquery-accordion</link>
		<comments>http://www.shanestrong.com/web-design/jquery-accordion#comments</comments>
		<pubDate>Fri, 29 Jan 2010 05:40:20 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[jQuery Accordion]]></category>
		<category><![CDATA[jQuery Accordion Widget]]></category>
		<category><![CDATA[jQuery Widget]]></category>
		<category><![CDATA[jQuery WordPress]]></category>

		<guid isPermaLink="false">http://www.shanestrong.com/?p=1298</guid>
		<description><![CDATA[jQuery comes with a ton of different pre-made widgets. Some of which are really sweet and simple to implement into your website. One of the most notable of the widgets is the jQuery Accordion. This is a really easy way to squeeze a bunch of text, images, buttons, or whatever you are using in to [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery comes with a ton of different pre-made widgets.  Some of which are really sweet and simple to implement into your website.  One of the most notable of the widgets is the jQuery Accordion.  This is a really easy way to squeeze a bunch of text, images, buttons, or whatever you are using in to a smaller area.  why would you need this?  Well if you have a website that has a bunch of stuff on it and need more space.  This is a great way to make more space.  For instance using a WordPress theme.  You may want to have somewhere in the numbers of 10-20 posts on your home page.  Now most WordPress themes do have 10 posts on the home page but I don&#8217;t know about you but that makes the site look really bloated.  That is where you bring in the jQuery Accordion widget.  That way you can maybe have one main post or featured post and all the rest of the 10 or how many ever can be squeezed into just the titles maybe.  Then when you click on the title in will open that post and if you have another post open it will close the open one.  </p>
<h3>How to use jQuery Accordion</h3>
<p>You do not have to use this for WordPress, you can use this on almost anything to make more space.  Here is how you would go about using the Accordion widget.</p>
<h4>Include your scripts</h4>
<p>These should go into your head section of your web page.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">&lt;head&gt;
//Default jQuery Style Sheet
&lt;link type=&quot;text/css&quot; href=&quot;http://jqueryui.com/latest/themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
//Google Hosted
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://jqueryui.com/ui/ui.accordion.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;</pre></div></div>

<h4>What happens next?</h4>
<p>Now you have to create your accordion script.  This is going to be hard for anyone who has never worked with jQuery so get ready.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">//Your accordion script
&lt;script type=&quot;text/javascript&quot;&gt;
$(function() {
    $(&quot;your_id or your_class&quot;).accordion();
});
&lt;/script&gt;</pre></div></div>

<p>That code can either go in your head section or your footer.  Ok so I kind of lied about that part being hard to do.  But this next part is going to be even harder yet.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">//This is where you create you info
&lt;div id=&quot;your_id&quot; class=&quot;your_class&quot;&gt;
//You only need either a class or a id.
//What ever you want to use the Accordion widget
//should have the same HTML element after your class
//or ID.
    &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;This will be the first area's heading&lt;/a&gt;&lt;/h3&gt;
        &lt;div&gt;
            &lt;p&gt;This is your content in area 1&lt;/p&gt;
        &lt;/div&gt;
    &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;This will be the second area's heading&lt;/a&gt;&lt;/h3&gt;       
        &lt;div&gt;
            &lt;p&gt;This is your content in area 2&lt;/p&gt;
            &lt;img src=&quot;http://www.shanestrong.com/wp-content/uploads/2009/07/jQuery-hover.jpg&quot; /&gt;
        &lt;/div&gt;
    &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;This will be the third area's heading&lt;/a&gt;&lt;/h3&gt;
        &lt;div&gt;
            &lt;p&gt;This is your content in area 3&lt;/p&gt;
            &lt;p&gt;Another paragraph&lt;/p&gt;
        &lt;/div&gt;
    &lt;h3&gt;&lt;a href=&quot;#&quot;&gt;This will be the fourth area's heading&lt;/a&gt;&lt;/h3&gt;
        &lt;div&gt;
            &lt;p&gt;This is your content in area 4&lt;/p&gt;
            &lt;ul&gt;
                &lt;li&gt;List Item One&lt;/li&gt;
                &lt;li&gt;List Item Two&lt;/li&gt;
                &lt;li&gt;List Item Three&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<h3>That is all there is to jQuery Accordion</h3>
<p>The only thing left to do is check it out for yourself I have created a page that has all the code.  If you would like to just see jQuery Accordion in action you can go to the link below.  If you would like to save the page you can just go to it and (Right Click and go to Save Page As).</p>
<p>jQuery Accordion: <a target="_blank" href="/jquery/accordion/accordion.htm" title="jQuery Accordion Tutorial">jQuery Accordion Trial</a></p>
<p>Download: <a class="downloadlink" href="http://www.shanestrong.com/downloads73" title="Version1.0 downloaded 13 times" >jQuery Accordion (13)</a></p>
<h3>jQuery Accordion Extras</h3>
<p>If you would like to learn more about this great jQuery widget just go to <a target="_blank" href="http://jqueryui.com/demos/accordion/">Here</a></p>
<h3>Website Design , Development, and SEO Marketing</h3>
<p>If by chance you are in need of any web design, web development, search engine optimization, or marketing done to one of your sites you can get in contact with me or you can contact Chosen.  Chosen is a Lansing based Web Development, Web Design, Web Hosting, and Web Marketing firm.  We are a small business but are growing in the Lansing Area for our Web Design and Development skills.  We have done work for clients and companies. We prefer client work but we also take contract work.  We have worked with most of the biggest web companies in the Lansing Area and all the way out to California.  We would love to hear from you.</p>
<!-- Start Sociable --><div class="sociable"><div class="sociable_tagline">Spread and Share</div><ul class='clearfix'><li><a title="Twitter" class="option1_32" style="background-position:-288px -32px" rel="nofollow" target="_blank" href="http://twitter.com/intent/tweet?text=jQuery%20Accordion%20-%20http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion%20(via%20@sociablesite)"></a></li><li><a title="Facebook" class="option1_32" style="background-position:-96px 0px" rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;t=jQuery%20Accordion"></a></li><li><a title="StumbleUpon" class="option1_32" style="background-position:-224px -32px" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&title=jQuery%20Accordion"></a></li><li><a title="LinkedIn" class="option1_32" style="background-position:-288px 0px" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion&amp;source=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan&amp;summary=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li><a title="Delicious" class="option1_32" style="background-position:-32px 0px" rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion&amp;notes=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li><a title="Google Bookmarks" class="option1_32" style="background-position:-192px 0px" rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion&amp;annotation=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li><a title="Digg" class="option1_32" style="background-position:-64px 0px" rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion&amp;bodytext=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li><a title="Reddit" class="option1_32" style="background-position:-128px -32px" rel="nofollow" target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion"></a></li><li><a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById('sociable-post-1298'), event, 'post-1298')" onMouseOver="more(this,'post-1298')"><img style='margin-top:9px' src='http://www.shanestrong.com/wp-content/plugins/sociable/images/more.png'></a></li></ul><div onMouseout="fixOnMouseOut(this,event,'post-1298')" id="sociable-post-1298" style="display:none;">   











    <div style="top: auto; left: auto; display: block;" id="sociable">























		<div class="popup">











			<div class="content">











				<ul><li style="heigth:32px;width:32px"><a title="Myspace" class="option1_32" style="background-position:0px -32px" rel="nofollow" target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;t=jQuery%20Accordion"></a></li><li style="heigth:32px;width:32px"><a title="HackerNews" class="option1_32" style="background-position:-256px 0px" rel="nofollow" target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;t=jQuery%20Accordion"></a></li><li style="heigth:32px;width:32px"><a title="MSNReporter" class="option1_32" style="background-position:-352px 0px" rel="nofollow" target="_blank" href="http://reporter.es.msn.com/?fn=contribute&amp;Title=jQuery%20Accordion&amp;URL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;cat_id=6&amp;tag_id=31&amp;Remark=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li style="heigth:32px;width:32px"><a title="BlinkList" class="option1_32" style="background-position:0px 0px" rel="nofollow" target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;Title=jQuery%20Accordion"></a></li><li style="heigth:32px;width:32px"><a title="Sphinn" class="option1_32" style="background-position:-192px -32px" rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion"></a></li><li style="heigth:32px;width:32px"><a title="Posterous" class="option1_32" style="background-position:-64px -32px" rel="nofollow" target="_blank" href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion&amp;selection=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li style="heigth:32px;width:32px"><a title="Tumblr" class="option1_32" style="background-position:-256px -32px" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;t=jQuery%20Accordion&amp;s=jQuery%20comes%20with%20a%20ton%20of%20different%20pre-made%20widgets.%20%20Some%20of%20which%20are%20really%20sweet%20and%20simple%20to%20implement%20into%20your%20website.%20%20One%20of%20the%20most%20notable%20of%20the%20widgets%20is%20the%20jQuery%20Accordion.%20%20This%20is%20a%20really%20easy%20way%20to%20squeeze%20a%20bunch%20of%20text%2C%20"></a></li><li style="heigth:32px;width:32px"><a title="email" class="option1_32" style="background-position:-160px 0px" rel="nofollow" target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&to&su=jQuery%20Accordion&body=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&ui=2&tf=1&shva=1"></a></li><li style="heigth:32px;width:32px"><a title="Google Reader" class="option1_32" style="background-position:-224px 0px" rel="nofollow" target="_blank" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion&amp;srcURL=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;srcTitle=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan"></a></li><li style="heigth:32px;width:32px"><a class="option1_32" style="cursor:pointer;background-position:-128px 0px" rel="nofollow" title="Add to favorites - doesn't work in Chrome"  onClick="javascript:AddToFavorites();"></a></li></ul>			











			</div>        











		  <a style="cursor:pointer" onclick="hide_sociable('post-1298',true)" class="close">























		  <img onclick="hide_sociable('post-1298',true)" title="close" src="http://www.shanestrong.com/wp-content/plugins/sociable/images/closelabel.png">











		  </a>











		</div>











	</div> 











  </div></div><div class='sociable' style='float:none'><ul class='clearfix'><li id="Twitter_Counter"><a href="https://twitter.com/share" data-text="jQuery Accordion - http://www.shanestrong.com/web-design/jquery-accordion (via #sociablesite)" data-url="http://www.shanestrong.com/web-design/jquery-accordion" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li><li id="Facebook_Counter"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.shanestrong.com/web-design/jquery-accordion&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe></li><li id="Digg_Counter"><script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fweb-design%2Fjquery-accordion&amp;title=jQuery%20Accordion'  class='DiggThisButton DiggCompact'></a></li><li id="StumbleUpon_Counter"><script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.shanestrong.com/web-design/jquery-accordion"></script></li><li id="Google_p"><g:plusone annotation="bubble" href="http://www.shanestrong.com/web-design/jquery-accordion" size="medium"></g:plusone></li><li id="LinkedIn_Counter"><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="http://www.shanestrong.com/web-design/jquery-accordion" data-counter="right"></script></li></ul></div><!-- End Sociable --><img src="http://www.shanestrong.com/?ak_action=api_record_view&id=1298&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shanestrong.com/web-design/jquery-accordion/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Hover</title>
		<link>http://www.shanestrong.com/lansing-web-design/jquery-hover</link>
		<comments>http://www.shanestrong.com/lansing-web-design/jquery-hover#comments</comments>
		<pubDate>Fri, 24 Jul 2009 03:05:35 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Lansing Web Design]]></category>
		<category><![CDATA[Shane]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Lansing Web Development]]></category>
		<category><![CDATA[Shane Strong]]></category>

		<guid isPermaLink="false">http://www.shanestrong.com/?p=1003</guid>
		<description><![CDATA[As a developer I hate the fact that Internet Explorer is not up to date with their web browser. For instance the w3 has approved that you can use the :hover selector on anything not just a tags. Now most browsers do support the :hover selector but IE. Why they can&#8217;t catch up with times [...]]]></description>
			<content:encoded><![CDATA[<p>As a developer I hate the fact that Internet Explorer is not up to date with their web browser.  For instance the w3 has approved that you can use the :hover selector on anything not just a tags.  Now most browsers do support the :hover selector but IE.  Why they can&#8217;t catch up with times and be like everyone else is beyond my comprehension.  Well one really useful thing to fix this problem is jQuery Hover.  You can use jQuery Hover to give any object a hover state and it will work in IE and all other browsers.  Also you can have jQuery pull out the a tags href from inside any element.  For instance if you have some blocks with different information that you want to link to a certain page all you will have to do is make a box and call the a tags href.</p>
<h3>jQuery Hover State</h3>
<p>So to show you how to do this I am going to use my site under my main post on the homepage I have some of my recent post.  Now I want to have the full post area to have a jQuery hover state that changes the background.  So I would do this.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">$(document).ready(function() {
    //call the jQuery Hover Over and Out
    $('#YOURID').hover(over, out);
    //Tell the browser to change the background when hovered over
    function over(event) {
        $(this).css(&quot;background&quot;, &quot;url('Path To Your Image')&quot;);
	$(this).css(&quot;cursor&quot;, &quot;pointer&quot;);
    }
    //tell the browser to change the background to nothing when 
    //going outside the object area
    function out(event) {
	    $(this).css(&quot;background&quot;, &quot;&quot;);
	}
});</pre></div></div>

<h3>jQuery Hover with a click event</h3>
<p>If you want jQuery to do a hover state only then that will work for you but if you want to get the a tags href, so that when you click on the object area it will take you to that page.  You would have to add this after your jQuery hover code.  So now your jQuery code should be.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">$(document).ready(function() {
    //call the jQuery Hover Over and Out
    $('#YOURID').hover(over, out);
    //Tell the browser to change the background when hovered over
    function over(event) {
        $(this).css(&quot;background&quot;, &quot;url('Path To Your Image')&quot;);
	$(this).css(&quot;cursor&quot;, &quot;pointer&quot;);
    }
    //tell the browser to change the background to nothing 
    //when going outside the object area
    function out(event) {
	$(this).css(&quot;background&quot;, &quot;&quot;);
    }
    //This adds the click event to your object and tells it where to go
    $('#YOURID').click(function() {
	window.location=$(this).find(&quot;a&quot;).attr(&quot;href&quot;);
    });
});</pre></div></div>

<p>This is very useful to get around the IE problem and if someone checks your site they can see that you know jQuery.  If you need any help with this just let me know.  I would be more than willing to help.</p>
<h3>Website Design , Development, and SEO Marketing</h3>
<p>If you by chance need web design, web development, search engine optimization, or marketing done to one of your sites you can get in contact with me or you can contact Chosen. Chosen is a Lansing based Web Development, Web Design, Web Hosting, and Web Marketing firm. We are a small business but are growing in the Lansing Area for our Web Design and Development skills. We have done work for clients and companies. We prefer client work but we also take contract work. We have worked with most of the biggest web companies in the Lansing Area and all the way out to California. We would love to hear from you. </p>
<h3>Sponsors</h3>
<p>Get your <a target="_blank" href="http://www.lusterforever.com/department/charm-bracelet-10036.cfm">charm bracelets</a> in time for the new year. LusterForever.com features a complete collection of such bracelets.</p>
<!-- Start Sociable --><div class="sociable"><div class="sociable_tagline">Spread and Share</div><ul class='clearfix'><li><a title="Twitter" class="option1_32" style="background-position:-288px -32px" rel="nofollow" target="_blank" href="http://twitter.com/intent/tweet?text=jQuery%20Hover%20-%20http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover%20(via%20@sociablesite)"></a></li><li><a title="Facebook" class="option1_32" style="background-position:-96px 0px" rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;t=jQuery%20Hover"></a></li><li><a title="StumbleUpon" class="option1_32" style="background-position:-224px -32px" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&title=jQuery%20Hover"></a></li><li><a title="LinkedIn" class="option1_32" style="background-position:-288px 0px" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover&amp;source=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan&amp;summary=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li><a title="Delicious" class="option1_32" style="background-position:-32px 0px" rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover&amp;notes=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li><a title="Google Bookmarks" class="option1_32" style="background-position:-192px 0px" rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover&amp;annotation=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li><a title="Digg" class="option1_32" style="background-position:-64px 0px" rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover&amp;bodytext=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li><a title="Reddit" class="option1_32" style="background-position:-128px -32px" rel="nofollow" target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover"></a></li><li><a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById('sociable-post-1003'), event, 'post-1003')" onMouseOver="more(this,'post-1003')"><img style='margin-top:9px' src='http://www.shanestrong.com/wp-content/plugins/sociable/images/more.png'></a></li></ul><div onMouseout="fixOnMouseOut(this,event,'post-1003')" id="sociable-post-1003" style="display:none;">   











    <div style="top: auto; left: auto; display: block;" id="sociable">























		<div class="popup">











			<div class="content">











				<ul><li style="heigth:32px;width:32px"><a title="Myspace" class="option1_32" style="background-position:0px -32px" rel="nofollow" target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;t=jQuery%20Hover"></a></li><li style="heigth:32px;width:32px"><a title="HackerNews" class="option1_32" style="background-position:-256px 0px" rel="nofollow" target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;t=jQuery%20Hover"></a></li><li style="heigth:32px;width:32px"><a title="MSNReporter" class="option1_32" style="background-position:-352px 0px" rel="nofollow" target="_blank" href="http://reporter.es.msn.com/?fn=contribute&amp;Title=jQuery%20Hover&amp;URL=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;cat_id=6&amp;tag_id=31&amp;Remark=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li style="heigth:32px;width:32px"><a title="BlinkList" class="option1_32" style="background-position:0px 0px" rel="nofollow" target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;Title=jQuery%20Hover"></a></li><li style="heigth:32px;width:32px"><a title="Sphinn" class="option1_32" style="background-position:-192px -32px" rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover"></a></li><li style="heigth:32px;width:32px"><a title="Posterous" class="option1_32" style="background-position:-64px -32px" rel="nofollow" target="_blank" href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover&amp;selection=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li style="heigth:32px;width:32px"><a title="Tumblr" class="option1_32" style="background-position:-256px -32px" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;t=jQuery%20Hover&amp;s=As%20a%20developer%20I%20hate%20the%20fact%20that%20Internet%20Explorer%20is%20not%20up%20to%20date%20with%20their%20web%20browser.%20%20For%20instance%20the%20w3%20has%20approved%20that%20you%20can%20use%20the%20%3Ahover%20selector%20on%20anything%20not%20just%20a%20tags.%20%20Now%20most%20browsers%20do%20support%20the%20%3Ahover%20selector%20but%20"></a></li><li style="heigth:32px;width:32px"><a title="email" class="option1_32" style="background-position:-160px 0px" rel="nofollow" target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&to&su=jQuery%20Hover&body=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&ui=2&tf=1&shva=1"></a></li><li style="heigth:32px;width:32px"><a title="Google Reader" class="option1_32" style="background-position:-224px 0px" rel="nofollow" target="_blank" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover&amp;srcURL=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;srcTitle=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan"></a></li><li style="heigth:32px;width:32px"><a class="option1_32" style="cursor:pointer;background-position:-128px 0px" rel="nofollow" title="Add to favorites - doesn't work in Chrome"  onClick="javascript:AddToFavorites();"></a></li></ul>			











			</div>        











		  <a style="cursor:pointer" onclick="hide_sociable('post-1003',true)" class="close">























		  <img onclick="hide_sociable('post-1003',true)" title="close" src="http://www.shanestrong.com/wp-content/plugins/sociable/images/closelabel.png">











		  </a>











		</div>











	</div> 











  </div></div><div class='sociable' style='float:none'><ul class='clearfix'><li id="Twitter_Counter"><a href="https://twitter.com/share" data-text="jQuery Hover - http://www.shanestrong.com/lansing-web-design/jquery-hover (via #sociablesite)" data-url="http://www.shanestrong.com/lansing-web-design/jquery-hover" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li><li id="Facebook_Counter"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.shanestrong.com/lansing-web-design/jquery-hover&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe></li><li id="Digg_Counter"><script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Flansing-web-design%2Fjquery-hover&amp;title=jQuery%20Hover'  class='DiggThisButton DiggCompact'></a></li><li id="StumbleUpon_Counter"><script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.shanestrong.com/lansing-web-design/jquery-hover"></script></li><li id="Google_p"><g:plusone annotation="bubble" href="http://www.shanestrong.com/lansing-web-design/jquery-hover" size="medium"></g:plusone></li><li id="LinkedIn_Counter"><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="http://www.shanestrong.com/lansing-web-design/jquery-hover" data-counter="right"></script></li></ul></div><!-- End Sociable --><img src="http://www.shanestrong.com/?ak_action=api_record_view&id=1003&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shanestrong.com/lansing-web-design/jquery-hover/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To jQuery Toggle</title>
		<link>http://www.shanestrong.com/chosen/how-to-jquery-toggle</link>
		<comments>http://www.shanestrong.com/chosen/how-to-jquery-toggle#comments</comments>
		<pubDate>Wed, 22 Jul 2009 08:09:48 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[Chosen]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Lansing Web Design]]></category>
		<category><![CDATA[Shane]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Michigan Web Design]]></category>
		<category><![CDATA[Shane Strong]]></category>

		<guid isPermaLink="false">http://www.shanestrong.com/?p=950</guid>
		<description><![CDATA[jQuery was made to change the way that you write JavaScript. jQuery has tons of really nice effects that you can experiment with. One of my favorite things to do with jQuery is to do a toggle this is a really simple effect to do but will make people go WOW when they see it. [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery was made to change the way that you write JavaScript.  jQuery has tons of really nice effects that you can experiment with.  One of my favorite things to do with jQuery is to do a toggle this is a really simple effect to do but will make people go WOW when they see it.  You can use the toggle effect in multiple different way most of the time people just use the toggle up to down or toggle left to right.  But some people don&#8217;t know that you can use jQuery toggle to go from your upper left or right corner to the opposite corner.  Well here is some code that you can reference on different ways to toggle.</p>
<h2>Lets do the easy toggles first</h2>
<h3>Top To Bottom</h3>
<p>I am doing this for the comments section of most WordPress sites.  First you have to give the identify what the outer most container is of your comments section.  Mine is id comments.  So just to the top of my comments section I need to create a button but you don&#8217;t have to use a button it is just the easiest to explain.  So you should have something that looks like this.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;button id=&quot;comments_bottom&quot;&gt;This Is A Toggle Button&lt;/button&gt;
&lt;div id=&quot;comment&quot;&gt;
//Your Comment Code
&lt;/div&gt;</pre></div></div>

<p>You will notice that I gave the button a id that is so that jQuery can find it.  Next you have to create your js file.  I would name it something like toggle.js.  It should look like this depending on which way you want your content to toggle.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">//Top To Bottom
$(document).ready(function() {
	$(&quot;#comment&quot;).hide();
	$(&quot;#comments_button&quot;).click(function() {
		$(&quot;#comment&quot;).animate({height: &quot;toggle&quot;}, 1000);
	});
});
//Left To Right Or Right To Left
//In order to do either you must float your #comment 
//the direction you want your content to come from!
$(document).ready(function() {
	$(&quot;#comment&quot;).hide();
	$(&quot;#comments_button&quot;).click(function() {
		$(&quot;#comment&quot;).animate({width: &quot;toggle&quot;}, 1000);
	});
});
//Upper Left To Lower Right Or Upper Right To Lower Left
//These ones you also have to float from the direction 
//they are coming from!
$(document).ready(function() {
	$(&quot;#comment&quot;).hide();
	$(&quot;#comments_button&quot;).click(function() {
		$(&quot;#comment&quot;).animate({width: &quot;toggle&quot;, 
                    height: &quot;toggle&quot;}, 1000);
	});
});</pre></div></div>

<p>Now all you have to do is call your jQuery script and a jQuery library and your toggle up to down should work.  I use the Google library because of how quick it is.  You can find more info about the Google library here  <a target="_blank" href="http://code.google.com/apis/ajaxlibs/documentation/">jQuery Library</a></p>
<h3>Other Ways To Toggle</h3>
<p>There are a few other ways to do a toggle like from bottom to top and bottom corners to top corners.  There is also some other things that you can do with toggle like fading.  jQuery has a lot of really easy and light things that you can do to your site to make it just that much better.  If I were you I would take a look at their site <a target="_blank" href="http://jquery.com">jQuery</a>.</p>
<h3><a target="_blank" href="http://chosendevelopment.com" title="Chosen">Website Design , Development, and SEO Marketing</a></h3>
<p>If you by change need web design, web development, search engine optimization, or marketing done to one of your sites you can get in contact with me or you can contact Chosen. Chosen is a Lansing based Web Development, Web Design, Web Hosting, and Web Marketing firm. We are a small business but are growing in the Lansing Area for our Web Design and Development skills. We have done work for clients and companies. We prefer client work but we also take contract work. We have worked with most of the biggest web companies in the Lansing Area and all the way out to California. We would love to hear from you.</p>
<!-- Start Sociable --><div class="sociable"><div class="sociable_tagline">Spread and Share</div><ul class='clearfix'><li><a title="Twitter" class="option1_32" style="background-position:-288px -32px" rel="nofollow" target="_blank" href="http://twitter.com/intent/tweet?text=How%20To%20jQuery%20Toggle%20-%20http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle%20(via%20@sociablesite)"></a></li><li><a title="Facebook" class="option1_32" style="background-position:-96px 0px" rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;t=How%20To%20jQuery%20Toggle"></a></li><li><a title="StumbleUpon" class="option1_32" style="background-position:-224px -32px" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&title=How%20To%20jQuery%20Toggle"></a></li><li><a title="LinkedIn" class="option1_32" style="background-position:-288px 0px" rel="nofollow" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle&amp;source=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan&amp;summary=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li><a title="Delicious" class="option1_32" style="background-position:-32px 0px" rel="nofollow" target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle&amp;notes=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li><a title="Google Bookmarks" class="option1_32" style="background-position:-192px 0px" rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle&amp;annotation=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li><a title="Digg" class="option1_32" style="background-position:-64px 0px" rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle&amp;bodytext=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li><a title="Reddit" class="option1_32" style="background-position:-128px -32px" rel="nofollow" target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle"></a></li><li><a style="cursor:pointer" rel="nofollow" onMouseOut="fixOnMouseOut(document.getElementById('sociable-post-950'), event, 'post-950')" onMouseOver="more(this,'post-950')"><img style='margin-top:9px' src='http://www.shanestrong.com/wp-content/plugins/sociable/images/more.png'></a></li></ul><div onMouseout="fixOnMouseOut(this,event,'post-950')" id="sociable-post-950" style="display:none;">   











    <div style="top: auto; left: auto; display: block;" id="sociable">























		<div class="popup">











			<div class="content">











				<ul><li style="heigth:32px;width:32px"><a title="Myspace" class="option1_32" style="background-position:0px -32px" rel="nofollow" target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;t=How%20To%20jQuery%20Toggle"></a></li><li style="heigth:32px;width:32px"><a title="HackerNews" class="option1_32" style="background-position:-256px 0px" rel="nofollow" target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;t=How%20To%20jQuery%20Toggle"></a></li><li style="heigth:32px;width:32px"><a title="MSNReporter" class="option1_32" style="background-position:-352px 0px" rel="nofollow" target="_blank" href="http://reporter.es.msn.com/?fn=contribute&amp;Title=How%20To%20jQuery%20Toggle&amp;URL=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;cat_id=6&amp;tag_id=31&amp;Remark=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li style="heigth:32px;width:32px"><a title="BlinkList" class="option1_32" style="background-position:0px 0px" rel="nofollow" target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;Title=How%20To%20jQuery%20Toggle"></a></li><li style="heigth:32px;width:32px"><a title="Sphinn" class="option1_32" style="background-position:-192px -32px" rel="nofollow" target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle"></a></li><li style="heigth:32px;width:32px"><a title="Posterous" class="option1_32" style="background-position:-64px -32px" rel="nofollow" target="_blank" href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle&amp;selection=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li style="heigth:32px;width:32px"><a title="Tumblr" class="option1_32" style="background-position:-256px -32px" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;t=How%20To%20jQuery%20Toggle&amp;s=jQuery%20was%20made%20to%20change%20the%20way%20that%20you%20write%20JavaScript.%20%20jQuery%20has%20tons%20of%20really%20nice%20effects%20that%20you%20can%20experiment%20with.%20%20One%20of%20my%20favorite%20things%20to%20do%20with%20jQuery%20is%20to%20do%20a%20toggle%20this%20is%20a%20really%20simple%20effect%20to%20do%20but%20will%20make%20peopl"></a></li><li style="heigth:32px;width:32px"><a title="email" class="option1_32" style="background-position:-160px 0px" rel="nofollow" target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&to&su=How%20To%20jQuery%20Toggle&body=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&ui=2&tf=1&shva=1"></a></li><li style="heigth:32px;width:32px"><a title="Google Reader" class="option1_32" style="background-position:-224px 0px" rel="nofollow" target="_blank" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle&amp;srcURL=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;srcTitle=Shane+Strong+Lansing+WordPress+Web+Developer+Search+Engine+Optimization+Website+Consultant+Theme+Developer+Magento+Developer+Lansing+Michigan"></a></li><li style="heigth:32px;width:32px"><a class="option1_32" style="cursor:pointer;background-position:-128px 0px" rel="nofollow" title="Add to favorites - doesn't work in Chrome"  onClick="javascript:AddToFavorites();"></a></li></ul>			











			</div>        











		  <a style="cursor:pointer" onclick="hide_sociable('post-950',true)" class="close">























		  <img onclick="hide_sociable('post-950',true)" title="close" src="http://www.shanestrong.com/wp-content/plugins/sociable/images/closelabel.png">











		  </a>











		</div>











	</div> 











  </div></div><div class='sociable' style='float:none'><ul class='clearfix'><li id="Twitter_Counter"><a href="https://twitter.com/share" data-text="How To jQuery Toggle - http://www.shanestrong.com/chosen/how-to-jquery-toggle (via #sociablesite)" data-url="http://www.shanestrong.com/chosen/how-to-jquery-toggle" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script></li><li id="Facebook_Counter"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.shanestrong.com/chosen/how-to-jquery-toggle&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe></li><li id="Digg_Counter"><script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a href='http://digg.com/submit?url=http%3A%2F%2Fwww.shanestrong.com%2Fchosen%2Fhow-to-jquery-toggle&amp;title=How%20To%20jQuery%20Toggle'  class='DiggThisButton DiggCompact'></a></li><li id="StumbleUpon_Counter"><script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.shanestrong.com/chosen/how-to-jquery-toggle"></script></li><li id="Google_p"><g:plusone annotation="bubble" href="http://www.shanestrong.com/chosen/how-to-jquery-toggle" size="medium"></g:plusone></li><li id="LinkedIn_Counter"><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="http://www.shanestrong.com/chosen/how-to-jquery-toggle" data-counter="right"></script></li></ul></div><!-- End Sociable --><img src="http://www.shanestrong.com/?ak_action=api_record_view&id=950&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shanestrong.com/chosen/how-to-jquery-toggle/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

