<?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>UH.LEE.KA &#187; Scripting</title>
	<atom:link href="http://www.uhleeka.com/blog/category/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.uhleeka.com/blog</link>
	<description>If you think nobody cares about you, try missing a few car payments.</description>
	<lastBuildDate>Wed, 25 Aug 2010 01:35:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>bubbletip! A jQuery Coda-style bubble tooltip plugin</title>
		<link>http://www.uhleeka.com/blog/2009/11/bubbletip/</link>
		<comments>http://www.uhleeka.com/blog/2009/11/bubbletip/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 02:26:46 +0000</pubDate>
		<dc:creator>uhleeka</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bubbletip]]></category>
		<category><![CDATA[Coda]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ToolTip]]></category>

		<guid isPermaLink="false">http://www.uhleeka.com/blog/?p=436</guid>
		<description><![CDATA[Download http://code.google.com/p/bubbletip/downloads/list Demo page http://uhleeka.com/demo/bubbletip/ Discuss http://groups.google.com/group/bubbletip Features multiple tips on a page multiple tips per jQuery element tips open outward in four directions: up down left right tips can be: anchored to the triggering jQuery element absolutely positioned opened at the current mouse coordinates anchored to a specified jQuery element IE png transparency is [...]]]></description>
			<content:encoded><![CDATA[<h4>Download</h4>
<p><a href="http://code.google.com/p/bubbletip/downloads/list">http://code.google.com/p/bubbletip/downloads/list</a></p>
<h4>Demo page</h4>
<p><a href="http://uhleeka.com/demo/bubbletip/">http://uhleeka.com/demo/bubbletip/</a></p>
<h4>Discuss</h4>
<p><a href="http://groups.google.com/group/bubbletip">http://groups.google.com/group/bubbletip</a></p>
<h4>Features</h4>
<ul>
<li>multiple tips on a page</li>
<li>multiple tips per jQuery element</li>
<li>tips open outward in four directions:
<ul>
<li>up</li>
<li>down</li>
<li>left</li>
<li>right</li>
</ul>
</li>
<li>tips can be:
<ul>
<li>anchored to the triggering jQuery element</li>
<li>absolutely positioned</li>
<li>opened at the current mouse coordinates</li>
<li>anchored to a specified jQuery element</li>
</ul>
</li>
<li>IE png transparency is handled via filters</li>
</ul>
<h4>Tested (lightly)</h4>
<ul>
<li>IE 6 on XP</li>
<li>IE 7 and 8 on Vista</li>
<li>Firefox 3.5 on Vista</li>
<li>Chrome 3.0 on Vista</li>
<li>Safari 3.2 on Vista</li>
</ul>
<h4>Examples</h4>
<p>MOUSEOVER to open a tooltip <a id="a1_up" href="#">above</a>, <a id="a1_down" href="#">below</a>, <a id="a1_left" href="#">to the left</a> or <a id="a1_right" href="#">to the right</a> of any element.</p>
<p>MOUSEOVER a <a id="a1_trigger" href="#">trigger element</a> to open a tooltip above and below a <a id="a1_target" href="#">target element</a>.<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script><script src="http://www.uhleeka.com/blog/wp-content/uploads/2009/11/jQuery.bubbletip-1.0.4.js" type="text/javascript"></script>
<link href="http://www.uhleeka.com/blog/wp-content/uploads/2009/11/bubbletip/bubbletip.css" rel="stylesheet" type="text/css" /><!--[if IE]>
<link href="http://www.uhleeka.com/blog/wp-content/uploads/2009/11/bubbletip/bubbletip-IE.css" rel="stylesheet" type="text/css" /><![endif]--><script type="text/javascript">
		$(document).ready(function() {
			$('#a1_up').bubbletip($('#tip1_up'));
			$('#a1_down').bubbletip($('#tip1_down'), {
				deltaDirection: 'down',
				deltaPosition: 50,
				offsetTop: 20
			});
			$('#a1_left').bubbletip($('#tip1_left'), {
				deltaDirection: 'left',
				animationDuration: 100,
				offsetLeft: -20
			});
			$('#a1_right').bubbletip($('#tip1_right'), { deltaDirection: 'right' });
			$('#a1_trigger').bubbletip($('#tip1_trigger1'), { positionAtElement: $('#a1_target') });
			$('#a1_trigger').bubbletip($('#tip1_trigger2'), {
				positionAtElement: $('#a1_target'),
				deltaDirection: 'down'
			});
		});
	</script><br />
<style type="text/css">
pre.tip
		{
			margin: 0px;
			padding: 5px;
			font-size: 0.9em;	
		}
</style>
<div style="display:none;">
<div id="tip1_up" style="display:none;">
<pre class="tip">{ deltaDirection: 'up' }</pre>
</div>
<div id="tip1_down" style="display:none;">
<pre class="tip">{
    deltaDirection: 'down',
    deltaPosition: 100,
    offsetTop: 10
}</pre>
</div>
<div id="tip1_left" style="display:none;">
<pre class="tip">{
    deltaDirection: 'left',
    animationDuration: 100,
    offsetLeft: -20
}</pre>
</div>
<div id="tip1_right" style="display:none;"><img src="http://www.uhleeka.com/blog/wp-content/uploads/2009/11/bubble.jpg" width="128" height="128" /></div>
<div id="tip1_trigger1" style="display:none;">
<pre class="tip">{
    deltaDirection: 'up',
    positionAtElement: $('#a1_target')
}</pre>
</div>
<div id="tip1_trigger2" style="display:none;">
<pre class="tip">{
    deltaDirection: 'down',
    positionAtElement: $('#a1_target')
}</pre>
</div>
</div>
<p><span id="more-436"></span><br />
<h4>Using it?</h4>
<p>If you enjoy using it, I&#8217;d love to hear about it.  Drop a comment with a link!</p>
<h4>Credit</h4>
<p>bubbletip was inspired by <a href="http://jqueryfordesigners.com/coda-popup-bubbles/" rel="nofollow">http://jqueryfordesigners.com/coda-popup-bubbles/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uhleeka.com/blog/2009/11/bubbletip/feed/</wfw:commentRss>
		<slash:comments>98</slash:comments>
		</item>
		<item>
		<title>MooTools.Tips Port v1.1 to v1.2</title>
		<link>http://www.uhleeka.com/blog/2008/11/mootoolstips-convert-v11-to-v12/</link>
		<comments>http://www.uhleeka.com/blog/2008/11/mootoolstips-convert-v11-to-v12/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 01:23:13 +0000</pubDate>
		<dc:creator>uhleeka</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[MooTips]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://www.uhleeka.com/blog/?p=78</guid>
		<description><![CDATA[Converting an old v1.1 implementation of basic MooTips to v1.2 requires just a couple of steps. However, keep in mind that the 1.2 Tips object is strictly meant as a tool tip. You cannot hover over the tip, so there is no built-in way to add interactivity with your tip. First, the CSS needs to [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left;width:93px;height:93px;margin:8px 8px 0px 0px;border:solid 1px #000;background-repeat:no-repeat;background-position:-40px -30px;background-image:url('http://www.uhleeka.com/blog/wp-content/uploads/2008/11/mootools.png');"></div>
<p>Converting an old v1.1 implementation of basic MooTips to v1.2 requires just a couple of steps.  However, keep in mind that the 1.2 Tips object is strictly meant as a tool tip.  You cannot hover over the tip, so there is no built-in way to add interactivity with your tip.  <span id="more-78"></span></p>
<p>First, the CSS needs to be changed because the underlying element structure of the tip has changed (see a prior post on <a href="http://www.uhleeka.com/blog/2008/11/mootools-tips-mootips/">MooTools.Tips in v1.2</a> for example css).</p>
<p>The new html structure looks like the following:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>&lt;div class="options.className"&gt;
&nbsp; &lt;div class="tip-top"&gt;&lt;/div&gt;
&nbsp; &lt;div class="tip"&gt;
&nbsp; &nbsp; &lt;div class="tip-title"&gt;&lt;/div&gt;
&nbsp; &nbsp; &lt;div class="tip-text"&gt;&lt;/div&gt;
&nbsp; &lt;/div&gt;
&nbsp; &lt;div class="tip-bottom"&gt;&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<p>Next, you need to import your Title::Text from the &#8220;title&#8221; attribute of your tip anchor.</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>&lt;span id="myTip" title="This is the title::This is the text"&gt;
&nbsp; Hover over me to see a tooltip
&lt;/span&gt;
&lt;span id="myTipAjax" title="AJAX::myurl.html"&gt;
&nbsp; Hover over me to see a tooltip retrieved via MooTools.Request
&lt;/span&gt;</pre></div></div>

<p>The following function parses out the &#8220;Title::Text&#8221; from the tip anchor and uses element storage to assign it to the tip.  It can also handle an &#8220;AJAX::url&#8221; format (Note the double colon).</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>function SetTipStorage(element) {
&nbsp; &nbsp; // create an array including the title at
&nbsp; &nbsp; // position 0 and the text at position 1
&nbsp; &nbsp; var content = element.get('title').split('::');&nbsp;  

&nbsp; &nbsp; switch(content[0]) {
&nbsp; &nbsp; &nbsp; &nbsp; case 'AJAX':
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var req = new Request({
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url: content[1],
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method: 'get',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onFailure: function(xhr) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.store('tip:title', 'ERROR');
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.store('tip:text', 'Ajax request failed');
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onSuccess: function(responseText, responseXML) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = responseText.split('::');
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // use the element storage functionality 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // to store the title and text for the 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // specified element
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.store('tip:title', content[0]);&nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.store('tip:text', content[1]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // remove the element title
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.title = '';
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; req.send();
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;
&nbsp; &nbsp; &nbsp; &nbsp; default:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // use the element storage functionality 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // to store the title and text for the 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // specified element
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.store('tip:title', content[0]);&nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.store('tip:text', content[1]);
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // remove the element title
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; element.title = '';
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;
&nbsp; &nbsp; }
}</pre></div></div>

<p>Finally, the last thing to do is to wire up the Tips at &#8220;domready&#8221;:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>window.addEvent('domready', function() {
&nbsp; &nbsp; var tips = new Tips();
&nbsp; &nbsp;  
&nbsp; &nbsp; SetTipStorage($('myTip'));
&nbsp; &nbsp; tips.attach($('myTip'), {
&nbsp; &nbsp; &nbsp; &nbsp; fixed: false,
&nbsp; &nbsp; &nbsp; &nbsp; showDelay: 0,
&nbsp; &nbsp; &nbsp; &nbsp; hideDelay: 0
&nbsp; &nbsp; });
&nbsp; &nbsp; SetTipStorage($('myTipAjax'));
&nbsp; &nbsp; tips.attach($('myTipAjax'), {
&nbsp; &nbsp; &nbsp; &nbsp; fixed: true,
&nbsp; &nbsp; &nbsp; &nbsp; showDelay: 0,
&nbsp; &nbsp; &nbsp; &nbsp; hideDelay: 0
&nbsp; &nbsp; });
});</pre></div></div>

<p>See the full code and demo at <a href="http://www.uhleeka.com/archives/mootools/1.2.1/tips-convert-v11/">http://www.uhleeka.com/archives/mootools/1.2.1/tips-convert-v11/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.uhleeka.com/blog/2008/11/mootoolstips-convert-v11-to-v12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MooTools.Tips v1.2</title>
		<link>http://www.uhleeka.com/blog/2008/11/mootools-tips-mootips/</link>
		<comments>http://www.uhleeka.com/blog/2008/11/mootools-tips-mootips/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 03:09:50 +0000</pubDate>
		<dc:creator>uhleeka</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[MooTips]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://www.uhleeka.com/blog/?p=60</guid>
		<description><![CDATA[Back in the days of MooTools v1.1, MooTips was an external class designed to use an element&#8217;s &#8220;title&#8221; attribute to control the content of the tip. See a demo of the 1.1 version. MooTools v1.2 includes a &#8220;Tips&#8221; class which operates very differently from the v1.1 extension. Browse the online documentation. Breaking it down&#8230; Download [...]]]></description>
			<content:encoded><![CDATA[<div style="float:left;width:93px;height:93px;margin:8px 8px 0px 0px;border:solid 1px #000;background-repeat:no-repeat;background-position:-40px -30px;background-image:url('http://www.uhleeka.com/blog/wp-content/uploads/2008/11/mootools.png');"></div>
<p>Back in the days of MooTools v1.1, MooTips was an external class designed to use an element&#8217;s &#8220;title&#8221; attribute to control the content of the tip.  See a demo of the <a href="http://www.uhleeka.com/archives/mootools/1.1/mootips/" target="_blank">1.1 version</a>.</p>
<p>MooTools v1.2 includes a &#8220;Tips&#8221; class which operates very differently from the v1.1 extension.  Browse the <a href="http://mootools.net/docs/Plugins/Tips" target="_blank">online documentation</a>.  <span id="more-60"></span></p>
<h4>Breaking it down&#8230;</h4>
<p>Download the MooTools <a href="http://mootools.net/download" target="_blank">core library</a> and use the <a href="http://mootools.net/more">more builder</a> to download the additional &#8220;Tips&#8221; functionality.  Include the files in the head of your page:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>&lt;script type="text/javascript" src="mootools-1.2.1-core-yc.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="mootools-1.2-more.js"&gt;&lt;/script&gt;</pre></div></div>

<p>Add the tooltip css:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>&lt;style type="text/css"&gt;
/* MooTools.Tips */
.tip-top {
&nbsp; &nbsp; color: #fff;
&nbsp; &nbsp; width: 139px;
&nbsp; &nbsp; z-index: 13000;
}
.tip-title {
&nbsp; &nbsp; width: 123px;
&nbsp; &nbsp; font-weight: bold;
&nbsp; &nbsp; font-size: 11px;
&nbsp; &nbsp; margin: 0;
&nbsp; &nbsp; color: #9FD4FF;
&nbsp; &nbsp; padding: 8px 8px 4px;
&nbsp; &nbsp; background: url(bubble.png) top left;
}
.tip-text {
&nbsp; &nbsp; width: 123px;
&nbsp; &nbsp; font-size: 11px;
&nbsp; &nbsp; padding: 4px 8px 8px;
&nbsp; &nbsp; background: url(bubble.png) bottom right;
&nbsp; &nbsp; color:#fff;
}
.tip-text A {
&nbsp; &nbsp; color:#069;
}
.tip-loading {
&nbsp; &nbsp; background: url(ajax_load.gif) center center no-repeat;
&nbsp; &nbsp; width: 30px;
&nbsp; &nbsp; height: 30px;
&nbsp; &nbsp; margin: 0 auto;
}
&lt;/style&gt;</pre></div></div>

<p>Add an element to tooltip:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>&lt;body&gt;
&nbsp; &lt;img src="moo.png" id="simple_tip" /&gt;
&lt;/body&gt;</pre></div></div>

<p>Using javascript, set the Title and Text to be displayed in the tip:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>$('simple_tip').store('tip:title', "This is the Title");
$('simple_tip').store('tip:text', "This is the Text");</pre></div></div>

<p>And finally, create the tip:</p>

<div class="uhleeka_codebox"><div class="uhleeka_codebox_in"><pre>var SimpleTip = new Tips($('simple_tip'), {
&nbsp; showDelay: 0,
&nbsp; hideDelay: 0,
&nbsp; offsets: {x: 10, y: 10},
&nbsp; fixed: false
});</pre></div></div>

<p>Check the full source code and a working <a href="http://www.uhleeka.com/archives/mootools/1.2.1/tips-simple" target="_blank">v1.2 simple Tips demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uhleeka.com/blog/2008/11/mootools-tips-mootips/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
