<?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>EeepZork!&#187; jQuery</title>
	<atom:link href="http://labs.elektrikcoma.com/blog/category/code/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.elektrikcoma.com/blog</link>
	<description>The unofficial offical comaLABS blog.</description>
	<lastBuildDate>Fri, 06 Nov 2009 07:24:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>using NOT abusing the CSS text-shadow property.</title>
		<link>http://labs.elektrikcoma.com/blog/code/using-not-abusing-the-css-text-shadow-property/</link>
		<comments>http://labs.elektrikcoma.com/blog/code/using-not-abusing-the-css-text-shadow-property/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 17:03:40 +0000</pubDate>
		<dc:creator>Mikael C. Fritts</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://labs.elektrikcoma.com/blog/?p=74</guid>
		<description><![CDATA[some browsers are currently supporting the CSS text-shadow property, although the others are slowly coming around. even though this property is technically part of the CSS level 3 library, more and more people are using it (and even more abusing it) everyday. here&#8217;s something that i find interesting that doesn&#8217;t abuse the property, but can [...]]]></description>
			<content:encoded><![CDATA[<p>some browsers are currently supporting the CSS text-shadow property, although the others are slowly coming around. even though this property is technically part of the CSS level 3 library, more and more people are using it (and even more abusing it) everyday. here&#8217;s something that i find interesting that doesn&#8217;t abuse the property, but can add more life to your page. </p>
<p>we&#8217;re going to use jQuery to add a the ability to make your elements glow on mouseover. any browser that doesn&#8217;t fully support the text-shadow property will still show the glow, but you won&#8217;t be able to add the &#8220;halo&#8221; effect. </p>
<p>so let&#8217;s get down to brass tacks shall we? all of the .js files you can download <a href="http://labs.elektrikcoma.com/blog/jq/glow/link_glow.rar">here</a> in a nice .rar file. there are a total of of three files you&#8217;ll need to call to make this bad boy work. </p>
<p><b>basic example</b><br />
<code><br />
$(document).ready(function() {<br />
  $('.glow-me').addGlow();<br />
});<br />
</code></p>
<p><b>advanced example</b><br />
<code><br />
$(document).ready(function() {<br />
  $('.glow-me').addGlow({<br />
    radius: 20,<br />
    textColor: '#ff0',<br />
    haloColor: '#ffa',<br />
    duration: 200<br />
  });<br />
});<br />
</code></p>
<p>you&#8217;ll want to customize your options in the <b>jquery-glowing.js</b> file. here&#8217;s the basic rundown:</p>
<li><b>textColor:</b> color the text should glow.
</li>
<li><b>haloColor: </b>halo color (for browsers that support it).
</li>
<li><b>radius:</b> controls the halo size (for browsers that support it).
</li>
<li><b>duration:</b> speed of the glowing effect.
<p><a href="http://labs.elektrikcoma.com/blog/jq/glow/demo.html" target="_blank"> Online demo is right here.</a></p>
</li>
]]></content:encoded>
			<wfw:commentRss>http://labs.elektrikcoma.com/blog/code/using-not-abusing-the-css-text-shadow-property/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a little &#8220;Web 2.0&#8243; on this chilly monday.</title>
		<link>http://labs.elektrikcoma.com/blog/code/a-little-web-20-on-this-chilly-monday/</link>
		<comments>http://labs.elektrikcoma.com/blog/code/a-little-web-20-on-this-chilly-monday/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 20:25:41 +0000</pubDate>
		<dc:creator>Mikael C. Fritts</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web App]]></category>

		<guid isPermaLink="false">http://labs.elektrikcoma.com/blog/?p=36</guid>
		<description><![CDATA[Seeing as I tout myself as a UI Web Designer/Developer I decided to actually post something that is relevant to my &#8220;field&#8221;. I don&#8217;t really use this script that much myself, not because it&#8217;s not functional, just that I haven&#8217;t really had any projects that could benefit from it. 
So what is it already?
It&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>Seeing as I tout myself as a UI Web Designer/Developer I decided to actually post something that is relevant to my &#8220;field&#8221;. I don&#8217;t really use this script that much myself, not because it&#8217;s not functional, just that I haven&#8217;t really had any projects that could benefit from it. </p>
<p>So what is it already?</p>
<p>It&#8217;s a simple tool tip script written in JavaScript (or DHTML if you will). Basically when your user mouses over a specified link a tool top will be displayed. You&#8217;ve seen this kind of script before, it&#8217;s actually pretty hard NOT to see it in use in today&#8217;s web world. I got tired of the regular &#8220;box&#8221; look and made it a bit more &#8220;Web 2.0&#8243;. Anyways, here comes the code. </p>
<p>All files are available in .rar format <a href="http://labs.elektrikcoma.com/bubble_tip.rar" title">here</a> and are free to download. Below I will explain the different aspects of the code and how to implement it. </p>
<p>The meat &#038; potato&#8217;s: The JavaScript.</p>
<p><code><br />
function showToolTip(e,text){<br />
	if(document.all)e = event;<br />
	var obj = document.getElementById('bubble_tooltip');<br />
	var obj2 = document.getElementById('bubble_tooltip_content');<br />
	obj2.innerHTML = text;<br />
	obj.style.display = 'block';<br />
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);<br />
	if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;<br />
	var leftPos = e.clientX - 100;<br />
	if(leftPos&lt;0)leftPos = 0;<br />
	obj.style.left = leftPos + 'px';<br />
	obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';<br />
}<br />
function hideToolTip()<br />
{<br />
document.getElementById('bubble_tooltip').style.display = 'none';<br />
}<br />
</code><br />
There really aren&#8217;t customizable variables in there, and I wouldn&#8217;t recommend changing anything unless you have a working knowledge of JavaScript. Make sure you include the JS file in the &lt;head&gt; of your document!</p>
<p>The customizable part: CSS.</p>
<p><code><br />
#bubble_tooltip{<br />
	width: 147px;<br />
	position: absolute;<br />
	display: none;<br />
}<br />
#bubble_tooltip .bubble_top{<br />
	background-image: url('../images/bubble_top.gif'); /*DEFINE THIS PATH!!! */<br />
	background-repeat: no-repeat;<br />
	height: 16px;<br />
}<br />
#bubble_tooltip .bubble_middle{<br />
	background-image: url('../images/bubble_middle.gif'); /*DEFINE THIS PATH!!! */<br />
	background-position: bottom left;<br />
	padding-left: 7px;<br />
	padding-right: 7px;<br />
}<br />
#bubble_tooltip .bubble_middle span{<br />
	position: relative;<br />
	top: -8px;<br />
	font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;<br />
	font-size: 11px;<br />
}<br />
#bubble_tooltip .bubble_bottom{<br />
	background-image: url('../images/bubble_bottom.gif'); /*DEFINE THIS PATH!!! */<br />
	background-repeat: no-repeat;<br />
	background-repeat: no-repeat;<br />
	height: 44px;<br />
	position: relative;<br />
	top: -6px;<br />
}<br />
</code><br />
Add the above CSS into your pre-existing CSS file. Modify the colors, font face, font size, etc&#8230; Make SURE you upload the image files to a specified directory and make sure your CSS reflects that. </p>
<p>Now implement the tool tip in your page. This can be used in an anchor tag or a span tag. I&#8217;ve included examples of both. </p>
<p>Using it with an anchor tag:<br />
<code><br />
&lt;a href="page.html" onmousemove="showToolTip(event,'This is where your text will go. Change at will!');return false" onmouseout="hideToolTip()">Focus Word&lt;/a&gt;<br />
</code>  </p>
<p>Using it with a span:<br />
<code><br />
&lt;span class="tooltip_text" href="page.html" onmousemove="showToolTip(event,'This is where your text will go. Change at will!');return false" onmouseout="hideToolTip()">Focus Word&lt;/span&gt;<br />
</code></p>
<p>There you have it.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.elektrikcoma.com/blog/code/a-little-web-20-on-this-chilly-monday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>password strength script, yet another one.</title>
		<link>http://labs.elektrikcoma.com/blog/code/password-strength-script-yet-another-one/</link>
		<comments>http://labs.elektrikcoma.com/blog/code/password-strength-script-yet-another-one/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 20:02:17 +0000</pubDate>
		<dc:creator>Mikael C. Fritts</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web App]]></category>

		<guid isPermaLink="false">http://labs.elektrikcoma.com/blog/?p=13</guid>
		<description><![CDATA[As a freelancer I get all kinds of requests for all kinds of scripts, most involving security of some sort, but what amazes me is that most of these people never ask for a password strength script. Maybe they have their own solution, maybe they&#8217;re just not thinking about it or don&#8217;t see the necessity. [...]]]></description>
			<content:encoded><![CDATA[<p>As a freelancer I get all kinds of requests for all kinds of scripts, most involving security of some sort, but what amazes me is that most of these people never ask for a password strength script. Maybe they have their own solution, maybe they&#8217;re just not thinking about it or don&#8217;t see the necessity. </p>
<p>In today&#8217;s day and age, I think it should be mandatory to keep your data as secure as possible, yes I&#8217;m pointing out the obvious over here. No matter what kind of security you implement on your side, your user can be the biggest threat to you in the end. How many people are using &#8220;password&#8221; or &#8220;suzan&#8221; as their password. You can limit this kind of behavior and also bring to your users attention the fact that, yes a familiar password is easy to remember, but it is just as easy to crack. </p>
<p>So here is a simple script that implements AJAX and jQuery to display a nice password strength meter for user when signing up. Geek out continues below.</p>
<p>> This is a very small plugin for jQuery.<br />
> Naturally, jQuery is required to run it. You can download jQuery <a href="http://jquery.com/" target="_blank">HERE</a> and of course it&#8217;s free.</p>
<p>Now let&#8217;s get into the meat of this already, shall we?</p>
<p>First up, you&#8217;re going to need the JavaScript files from <a href="http://labs.elektrikcoma.com/blog/wp-content/uploads/pw_checker.rar">HERE</a>. Unpack the files and upload to the proper directory on your server. Eeezzee peezzzyyy!</p>
<p>Now you need to insert the following code anywhere BEFORE the password field on your page.<br />
<code><br />
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;  // make sure you adjust your path!<br />
&lt;script type="text/javascript" src="js/jquery.pstrength-min.1.2.js"&gt;<br />
&lt;/script&gt;<br />
&lt;script type="text/javascript"&gt;<br />
$(function() {<br />
$('.password').pstrength();<br />
});<br />
&lt;/script&gt;<br />
</code></p>
<p>Insert the class &#8220;password&#8221; into the dialogue box so we know it&#8217;s identified as a password box. Example:<br />
<code><br />
&lt;INPUT class="password" type=password name="Password"&gt;<br />
</code></p>
<p>Now for the last step, adding new tags to your existing CSS file. Something like this should do the trick, but you can change as you see fit.<br />
<code><br />
.password {<br />
font-size : 12px;<br />
border : 1px solid #000000;<br />
width : 200px;<br />
font-family : Verdana, Arial, Helvetica, sans-serif;<br />
}<br />
.pstrength-minchar {<br />
font-size : 10px;<br />
}<br />
</code></p>
<p>And there you have it! All done. You can change a few settings inside jquery.pstrength-min.1.2.js, such as messages, length/height of the bar, etc&#8230; just make sure you know what you&#8217;re playing with!!!<br />
<code><br />
<script type="text/javascript" src="http://labs.elektrikcoma.com/jquery.js"></script><br />
<script type="text/javascript" src="http://labs.elektrikcoma.com/jquery.pstrength-min.1.2.js">
</script><br />
<script type="text/javascript">
$(function() {
$('.password').pstrength();
});
</script><br />
<font color="#990000">EXAMPLE:</font><br />
Password:</p>
<input class="password" name="Password" size="20" type="password"/>
</code></p>
<p><font color="#990000">Ed. Note: </font> Try using common passwords like &#8220;pass&#8221; &#8220;password&#8221; &#8220;love&#8221; &#8220;sex&#8221; &#8220;1234&#8243;, etc.. and see what happens. Common phrases like these can be included in the jquery.pstrength-min.1.2 JavaScript file.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.elektrikcoma.com/blog/code/password-strength-script-yet-another-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
