<?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>DocuView - document management system &#187; jquery</title>
	<atom:link href="http://docuview.co.uk/index.php/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://docuview.co.uk</link>
	<description>revolutionary web 2.0 document management system</description>
	<lastBuildDate>Fri, 25 Jun 2010 00:50:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>styling forms &#8211; the 21st century way</title>
		<link>http://docuview.co.uk/index.php/2009/08/styling-forms-the-21st-century-way/</link>
		<comments>http://docuview.co.uk/index.php/2009/08/styling-forms-the-21st-century-way/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 18:09:18 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[alternative]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[docuview]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[line-height]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/?p=354</guid>
		<description><![CDATA[Even better usage of labels in beautiful semantically enhanced forms combined with jQuery (as seen at ZURB).]]></description>
			<content:encoded><![CDATA[<p>Based on an<a title="styling forms as used in DocuView" href="http://www.zurb.com/article/271/making-forms-convert-through-awesome-inli"> amazing article from ZURB</a> I recommend you have a look at I have revisited their technique to:</p>
<ul>
<li>deliver the same solution in jQuery</li>
<li>use a bit more flexible CSS (at least in my view)</li>
<li>redesign our search box</li>
</ul>
<p><span id="more-354"></span></p>
<p>Up until now we have been using a simple JavaScript solution:</p>
<pre class="brush: xml;">&lt;form id=&quot;search&quot; action=&quot;/index.php&quot; method=&quot;get&quot;&gt;
&lt;div&gt;
&lt;input class=&quot;search_string&quot; type=&quot;text&quot; name=&quot;search_string&quot; id=&quot;search_string&quot; onfocus=&quot;if (this.value == this.defaultValue) this.value = '';&quot; onblur=&quot;if (trim(this.value) == '') this.value = this.defaultValue;&quot; onmouseover=&quot;this.focus();&quot; value=&quot;search DocuView&quot; /&gt;
&lt;input class=&quot;search_submit&quot; type=&quot;submit&quot; name=&quot;search_submit&quot; id=&quot;search_submit&quot; value=&quot;&quot; /&gt;
&lt;input class=&quot;hidden&quot; type=&quot;hidden&quot; name=&quot;page&quot; value=&quot;search&quot; /&gt;
&lt;/div&gt;
&lt;/form&gt;</pre>
<p>It worked just fine. Displayed the desired value in the input field and on focus it&#8217;d replace it with cursor&#8230; We use that in combination with:</p>
<pre class="brush: xml;">&lt;body class=&quot;documents&quot; onload=&quot;document.forms[0].elements[0].focus();&quot;&gt;</pre>
<p>which would automatically focus on the form&#8217;s search field upon loading the document AND:</p>
<pre class="brush: jscript;">
function trim(string)
{
return string.replace(/^\s+|\s+$/g, '')
}
</pre>
<p>The sought after not built-in JavaScript trim function (there is a jQuery alternative, see below).</p>
<p>Since then I have also read this <a title="text-indent workaround in IE6/IE7" href="http://www.productivedreams.com/ie-not-intepreting-text-indent-on-submit-buttons/">article on optimising and styling the submit/search button in IE6/IE7</a> or generally any browser not supporting text-indent on button elements.</p>
<h3>Now for the NEW code</h3>
<p>I have used more or less the same code as seen at ZURB.</p>
<pre class="brush: xml;">
&lt;form id=&quot;search&quot; action=&quot;/testing/label.php&quot; method=&quot;get&quot;&gt;
&lt;div&gt;
&lt;label for=&quot;search-string&quot; class=&quot;overlay&quot;&gt;&lt;span&gt;search Docu&lt;strong&gt;View&lt;/strong&gt;&lt;/span&gt;&lt;/label&gt;
&lt;input class=&quot;search-string&quot; type=&quot;text&quot; name=&quot;search-string&quot; id=&quot;search-string&quot; value=&quot;search]&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;search-submit&quot; id=&quot;search-submit&quot; value=&quot;search DocuView&quot; /&gt;
&lt;/div&gt;
&lt;/form&gt;
</pre>
<p>I have used an id for the form to make the CSS specific, easier to insert and start using immediately. I have to admit I have tried to omit the extra class on the label but the jQuery code stopped working (and frankly I do not know why yet &#8211; I&#8217;m hoping some of you will help me shed some light on it/I&#8217;ll figure out why soon). Anywho&#8230;</p>
<h3>Coding the form behaviour</h3>
<p>I have used relative units (em) to ensure the form scales with the size of the font. Also our tweaked version of <a title="CSS Reset stylesheet" href="http://meyerweb.com/eric/tools/css/reset/">Eric Meyer&#8217;s Reset CSS</a> is used. The result is acceptably similar in all major browsers (IE7/8, Firefox 3.5, Opera 9, Safari 4, Chrome 2, IE6 is having a problem displaying the submit button as defined &#8211; maybe some of you will know how to solve that). In Opera the input field is *slightly* lower than I&#8217;d like it to be. I have tried cheating it: converted all the values from relative to fixed (em -&gt; px), using 16px font (.75em = 12px, .5em = 8px, .25em = 4px) + I had to add &#8220;invisible&#8221; (white) borders to both the <strong>search-string</strong> input field and <strong>the span contained in the label</strong> but to no avail. At this point there does not seem to be a way to achieve pixel perfect overlay between the input field and the span (in XHTML Strict). Yet!</p>
<p>Apart from converting the JavaScript from the Prototype to jQuery I have also added validating and styling the label when user deletes the contents of the input field OR loads the page with AutoFill/submitted form values in it. Also instead of using the not-yet-100%-supported opacity/transition all I&#8217;m changing is the color of the font in the span.</p>
<pre class="brush: jscript;">
$(document).ready(function()
{
// Select all textboxes and assign them to an array
var input	=	$('#search-string');
var label	=	$('label.overlay');

if (!$.trim(input.val())	==	'')
{
label.addClass('focus').addClass('hastext');
}
else
{
label.removeClass('focus').removeClass('hastext');
}

// Fade the label back when a field gains focus
input.focus(function()
{
if ($.trim($(this).val())	==	'')
{
label.addClass('focus');
}
else
{
label.addClass('hastext');
}
});

// Fade the label back when the user starts to type
input.keyup(function(e)
{
//	empty? label-&gt;focused
if ($.trim($(this).val())	==	'')
{
label.removeClass('hastext').removeClass('focus').addClass('focus');
}
else
{
label.addClass('hastext');
}
});

// Check if a field is empty when the user switches out
input.blur(function()
{
if ($.trim($(this).val())	==	'')
{
label.removeClass('focus').removeClass('hastext');
}
});
});
</pre>
<p>Don&#8217;t forget to include the jQuery library! <a title="styling forms as used in DocuView" href="http://demo.docuview.co.uk/testing/label.php">I have devised a demo</a> and have started implementing this throughout our software. As ZURB warned: do not overuse it. I was happy to find semantically friendlier and in a way much better solution than we have used so far.</p>
<h3>Finally: the CSS</h3>
<pre class="brush: css;">
body { font-size: 100%; font-family: Helvetica, Arial, sans-serif; line-height: 1.5; }
strong { font-weight: bold; }
#search { width: 20em; color: white; background-color: black; margin: 2em; }
#search div { position: relative; height: 3em; }
#search input { border: 0 none; font-family: Helvetica, Arial, sans-serif; font-size: 100%; }
#search label { position: absolute; left: .5em; top: .5em; width: 19em; height: 2em; background: white; z-index: 1; font-size: 100%; }
#search span { color: black; display: block; padding: .25em 0 0 .25em; border: 0 none; /*border-left: 1px solid white;*/ /*border-top: 2px solid white;*/ }
#search .focus span { color: #ccc; }
#search .hastext span { color: white; }
#search #search-string { position: absolute; z-index: 10; top: .5em; left: .5em; width: 87%; height: 2em; background: none; padding: .25em 0 0 .25em; /*border-top: 2px solid white;*/ }
#search #search-submit { background: transparent url(http://img.docuview.co.uk/sprite/search.png) no-repeat center center; height: 100%; width: 13%; font-size: 0; text-indent: -9999px; line-height: 0; display: block; position: absolute; top: 0; right: 0; z-index: 10; overflow: hidden; }
</pre>
<p>Thank you, ZURB guys, for the inspiration, I absolutely love the idea! I hope you find the implementation as useful as I have.</p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/08/styling-forms-the-21st-century-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fluid CSS steps &#8211; this is how it&#8217;s done :)</title>
		<link>http://docuview.co.uk/index.php/2009/07/fluid-css-steps-this-is-how-its-done/</link>
		<comments>http://docuview.co.uk/index.php/2009/07/fluid-css-steps-this-is-how-its-done/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 01:06:28 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[docuview]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[latest]]></category>
		<category><![CDATA[line-height]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[step menu]]></category>
		<category><![CDATA[steps]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wizard menu]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/?p=257</guid>
		<description><![CDATA[Create fluid (adaptive width) flexible CSS steps (wizard menu) for your applications, adjust it and pretty much do anything you want with it - this time the future-proof way.]]></description>
			<content:encoded><![CDATA[<p>I have had Cody Lindley&#8217;s <a title="cody lidnley's technique" href="http://codylindley.com/blogstuff/css/stepmenu/">technique</a> for CSS steps in the back of my head for soooo long and finally got around making my own version of it. My aim was to create a flexible fluid version of Lindley&#8217;s wizard menu. And I&#8217;ve succeeded. Here&#8217;s how:<span id="more-257"></span></p>
<h3>Approach</h3>
<p>Whether you decide to use &lt;ul&gt; or &lt;ol&gt; is entirely up to you. Do consider &lt;dl&gt; as well. In my example I have used &lt;ol&gt;. I was hoping to achieve semantically correct markup (read: not use tables &#8211; because that&#8217;s too easy and in a way cheating a bit) and create a solution that naturally stretches over the whole screen &#8211; so a block element.</p>
<p>Consider how many steps you are going to use in your CSS steps (wizard menu): 2, 3, 4, 5&#8230; more? Is more really necessary? Two, four and five steps are easy. You are going to end up with</p>
<ul>
<li>two steps both 50% wide (class &#8220;two_steps&#8221;)</li>
<li>four steps each 25% wide (class &#8220;four_steps&#8221;)</li>
<li>five steps each 20% wide (class &#8220;five_steps&#8221;)</li>
</ul>
<p>But what about 3? Since a floating point (decimals) is not 100% supported by all browsers and 33.3 × 3 ≠ 100, we have to cheat a little. I have decided to give the current element a width of 34%, leaving the other two at 33% (+ class &#8220;three_steps&#8221;). To users&#8217; eye hardly noticeable, to me achieving what I set out to do in the first place. You could use similar technique when working with 6 step menu: 5×16% + 1×20% OR 5×17% + 1×15%.</p>
<pre class="brush: css;">
/*	STEPS WIDTH	*/
#progress-bar.two_steps li { width: 50%; }
#progress-bar.three_steps li { width: 33%; }
#progress-bar.three_steps .current { width: 34%; }
#progress-bar.four_steps li { width: 25%; }
#progress-bar.five_steps li { width: 20%; }
</pre>
<p>Yes, one could argue I could simplify by omitting the #progress-bar, the choice is yours.</p>
<p>No matter how many steps you are using there are 5 (essentially 4) classes utilised: <strong>&#8220;current&#8221;</strong>, <strong>&#8220;previous&#8221;</strong>, <strong>&#8220;done&#8221;</strong>, <strong>&#8220;last&#8221;</strong> and empty.</p>
<ul>
<li>current &#8211; for the active element</li>
<li>previous &#8211; for the element just completed &#8211; preceding immediately the &#8220;current&#8221; class</li>
<li>done &#8211; for the element dealt with two (or more) steps back &#8211; for the element preceding immediately the &#8220;previous&#8221; class</li>
<li>last &#8211; for the very last element &#8211; used in conjunction with current</li>
</ul>
<p>Here is the CSS for the whole progress bar, I&#8217;ll go through each line separately:</p>
<pre class="brush: css;">
/*	PROGRESS BAR	*/
#progress-bar { text-transform: capitalize; margin-bottom: .25em; height: 3.5em; }
#progress-bar li { float: left; height: 3.5em; color: #ccc; background-color: #efefef; background-image: url(../img/steps/default.png); background-position: right center; background-repeat: no-repeat; }
#progress-bar a { display: block; padding: .25em; height: 3.5em; line-height: 150%; text-decoration: none; }
#progress-bar em { display: block; font-style: normal; font-weight: bold; }
#progress-bar span { display: block; }

#progress-bar .current { color: white; background-color: #369; background-image: url(../img/steps/current.png);  }
#progress-bar .current a { color: white; }
#progress-bar .last { background-image: none; }
#progress-bar .done { color: white; background-color: #c8e9ed; background-image: url(../img/steps/done.png); }
#progress-bar .previous { color: white; background-color: #c8e9ed; background-image: url(../img/steps/previous.png); }
</pre>
<p>I have sat down earlier and thought of the colours my progress bar is going to be. I wanted grey for bits that have not happened yet, the teasing (used #efefef as it is very light yet recognised as grey with #ccc for the colour of the text). Something stronger, bolder for the current element: #369, text white. And the previous and dealt-with parts: lighter blue perhaps, text white too? I used #c8e9ed as the background colour.</p>
<p>At this point I should maybe mention the four different background images we will be using to create the illusion of one step leading to another. According to the classes mentioned before I created four images that I will use as backgrounds of the li &#8211; list items. Here they are:</p>
<p><img class="alignleft size-full wp-image-264" title="default" src="http://docuview.co.uk/wp-content/uploads/2009/07/default.png" alt="default" width="30" height="88" /><img class="alignleft size-full wp-image-266" title="previous" src="http://docuview.co.uk/wp-content/uploads/2009/07/previous.png" alt="previous" width="30" height="88" /><img class="alignleft size-full wp-image-265" title="done" src="http://docuview.co.uk/wp-content/uploads/2009/07/done.png" alt="done" width="30" height="88" /><img class="alignleft size-full wp-image-263" title="current" src="http://docuview.co.uk/wp-content/uploads/2009/07/current.png" alt="current" width="30" height="88" /></p>
<p>The first one: default &#8211; as in the first step all steps but the first are yet to happen, the two transitions we will be witnessing is between the elements with grey background and the current element with the dark-blue background into the grey again. Every step after the current one &#8211; unless the current is the last step &#8211; is a little unknown (blue into grey) &#8211; the blend is obvious and easy. In the case where current IS the last step we combine it with the &#8220;last&#8221; class &#8211; which <strong>disables the background image</strong> yet <strong>preserves the background colour</strong>. The &#8220;previous&#8221; class transitions from lighter blue (has happened) immediately into &#8220;current&#8221; element &#8211; light-blue into dark-blue transition. And the last: &#8220;done&#8221;: both done and previous steps have happened, hence only a transition between light-blue AND light-blue. Easy, right? <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Since there is always going to be only one instance of the progress bar and since an id has more gravity as a selector than a class I named my little experiment &#8220;progress-bar&#8221;. I suppose the only important rule in the first line is the height of the whole thing. If you are trying to fit in more: change it.</p>
<p>Rather than using &#8220;li { display: inline; }&#8221; I floated the list items, the height matches the parent element and the important bit: the background. Since we are assigning the aforementioned background arrows to &lt;li&gt;s themselves, rather than explicitly writing the rule every time it occurs I defined the background-position and background-repeat for all the elements here. It doesn&#8217;t change throughout the steps and saves couple of bytes <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  No really..</p>
<p>Used &lt;em&gt; (emphasis) and &lt;span&gt; to describe the steps, rather than floating and clearing each other I used display: block on both. The rest deals with each step by changing the default background and the colour of the text to allow users to easily distinguish between what has happened and what is still ahead. The .current a { color: white; } rule is there to overwrite an existing one higher in the stylesheet, you might choose to leave it out.</p>
<p>As mentioned before: striving for semantically correct markup I have used &lt;ol&gt; &#8211; ordered list &#8211; they are steps in the end that happen in a particular order &#8211; so it only makes sense to use that. There is a link within each li, note that NOT ALL OF THE LINKS have a &#8220;href&#8221; attribute. The code for the first step is fairly simple &#8211; I have used an example from our day-to-day programming:</p>
<pre class="brush: php;">
&lt;ol id=&quot;progress-bar&quot; class=&quot;four_step&quot;&gt;
&lt;li class=&quot;current&quot;&gt;&lt;a href=&quot;#nogo&quot; title=&quot;description&quot;&gt;&lt;em&gt;step one &amp;raquo;&lt;/em&gt;&lt;span&gt;description&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title=&quot;members&quot;&gt;&lt;em&gt;step two &amp;raquo;&lt;/em&gt;&lt;span&gt;members&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title=&quot;folder access&quot;&gt;&lt;em&gt;step three &amp;raquo;&lt;/em&gt;&lt;span&gt;folder access&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;last&quot;&gt;&lt;a title=&quot;confirmation&quot;&gt;&lt;em&gt;step four &amp;raquo;&lt;/em&gt;&lt;span&gt;confirmation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</pre>
<p>This is what it the first step looks like formatted in real life:</p>
<p><img class="size-full wp-image-259 alignnone" title="form-steps" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps.png" alt="form-steps" width="692" height="260" /></p>
<p>Second step:</p>
<p><img class="size-full wp-image-260 alignnone" title="form-steps2" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps2.png" alt="form-steps2" width="692" height="385" /></p>
<p>Third step:</p>
<p><img class="alignnone size-full wp-image-261" title="form-steps3" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps3.png" alt="form-steps3" width="675" height="369" /></p>
<p>Fourth step:</p>
<p><img class="alignnone size-full wp-image-262" title="form-steps4" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps4.png" alt="form-steps4" width="675" height="369" /></p>
<p>Voila!</p>
<p>Believe it or not I have been searching for a similar solution all over the internet on and off for over a year. As I mentioned earlier the main credit goes to Cody, his awesome solution inspired me in the first place. I was excited implementing the solution in the latest DocuView and testing: successfully in IE6+ (hell) &#8211; Win, FF 2+ Win &amp; Mac, Safari 3+ Win &amp; Mac, Chrome 1+ Win and lets not forget Opera 9.5+ both Win &amp; Mac.</p>
<p>If you have any suggestions, if you think I could have done it easier or differently or if this too is what you have been looking for leave me a comment below.</p>
<p>Now I&#8217;m onto turning <a title="mac dock" href="http://nettuts.s3.amazonaws.com/358_jquery/example%20files/all-examples.html">this</a> (the MAC-like dock that is) into a semantically correct solution, one that works in IE6. And when I do, you will hear about it here. Make sure you subscribe to our feed to get the all the updates!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 947px; width: 1px; height: 1px;">At both W this point I should maybe mention the four different background images we will be using to create the illusion of one step leading to another.</div>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/07/fluid-css-steps-this-is-how-its-done/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>swfobject alternative for the latest jQuery (v1.3.2)</title>
		<link>http://docuview.co.uk/index.php/2009/05/swfobject-alternative-for-the-latest-jquery-v132/</link>
		<comments>http://docuview.co.uk/index.php/2009/05/swfobject-alternative-for-the-latest-jquery-v132/#comments</comments>
		<pubDate>Thu, 21 May 2009 10:40:02 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[alternative]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[latest]]></category>
		<category><![CDATA[swfobject]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/blog/index.php/2009/05/swfobject-alternative-for-the-latest-jquery-v132/</guid>
		<description><![CDATA[Last time I had to emebed flash the discussions about the importance of valid code were still young We used SWFObject and various codes even Adobe suggested back then, long before I knew about jQuery, long before I cared for embedding more than I had to (understand: deliver project, optimise later). Facing the same task [...]]]></description>
			<content:encoded><![CDATA[<p>Last time I had to emebed flash the discussions about the importance of valid code were still young <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We used SWFObject and various codes even Adobe suggested back then, long before I knew about jQuery, long before I cared for embedding more than I had to (understand: deliver project, optimise later).<span id="more-93"></span></p>
<p>Facing the same task now I quickly browsed to jQuery plugin repository to find&#8230; nothing! Nothing I&#8217;m happy with!</p>
<p>So half an hour later on Google I found (and implemented) this: <a title="jqeury swfobject alternative" href="http://jquery.thewikies.com/swfobject/">http://jquery.thewikies.com/swfobject/</a>.. It is indeed a jquery swfobject alternative to embed flash/swf without invalidating one&#8217;s code.</p>
<p>Hope it helps others too!</p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/05/swfobject-alternative-for-the-latest-jquery-v132/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; customised tooltips displaying the title of the link</title>
		<link>http://docuview.co.uk/index.php/2009/05/jquery-customised-tooltips-displaying-the-title-of-the-link/</link>
		<comments>http://docuview.co.uk/index.php/2009/05/jquery-customised-tooltips-displaying-the-title-of-the-link/#comments</comments>
		<pubDate>Fri, 08 May 2009 22:33:27 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[tooltip]]></category>
		<category><![CDATA[unobtrusive]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/blog/?p=87</guid>
		<description><![CDATA[Just finished implementing tooltips for a client. The idea was to display the description used in the title of the link (&#60;a href=&#8221;" title=&#8221;this part we are interested in and want to use&#8221;&#62;we did consider using the text too, but stick with the title afterwards&#60;/a&#62;) of the country/town in which our client has a branch. [...]]]></description>
			<content:encoded><![CDATA[<p>Just finished implementing tooltips for a <a title="Eurocopter UK" href="http://eurocopter.co.uk/">client</a>. The idea was to display the description used in the title of the link (&lt;a href=&#8221;" title=&#8221;this part we are interested in and want to use&#8221;&gt;we did consider using the text too, but stick with the title afterwards&lt;/a&gt;) of the country/town in which our client has a branch.</p>
<p>The idea is simple: loop through the links contained in the wrapper, read the unique title, append the content in divs (absolutely positioned, but I&#8217;ll get to that later) and display on hover over the elements.<span id="more-87"></span>The two most obvious solutions were: <a title="jQuery plugins - most popular" href="http://plugins.jquery.com/most_popular">jQuery plugin library (most popular)</a> and Google. The results on jQuery brought me to <a title="qtips jquery tooltips" href="http://www.thedrunkenepic.com/home/articles/jquery-plugin-qtips/">qTips</a>, which both visual- and function-wise seemed to have been doing the trick. Upon closer inspection though I have discovered that the way qTips is written (and with my understanding of jQuery) I wouldn&#8217;t be able to achieve what I was hoping for: qTips either picked up the first or the last title and duplicated it for all the links &#8211; not displaying unique results. I tried looping through links using .each(), functions with auto-increments, amending source file&#8230;</p>
<p>I was tweaking the js but after about 15 mins of trying I a) realised it wasn&#8217;t happening b) moved on to second choice <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Google answered with <a title="kriesi.at - jQuery tooltips" href="http://www.kriesi.at/archives/create-simple-tooltips-with-css-and-jquery">kriesi.at</a>.</p>
<p>Christian &#8220;Kriesi&#8221; Budschedl devised his own way of dealing with the matter though working with unique titles/elements form the very beginning and in very few lines he&#8217;s managed to answer my questions. All down to styling now <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I kinda liked the style of the qTips and the functionality of Kriesi&#8217;s solution and combined their effort into my own solution. Firstly the amended JS:</p>
<pre class="brush: jscript;">
//    jquery - qTips/simple tooltip - eurocopter world
function simple_tooltip(target_items, name)
{
$(target_items).each(function(i)
{
$(&quot;body&quot;).append(&quot;&amp;lt;div class='&quot;+name+&quot;' id='&quot;+name+i+&quot;'&amp;gt;&amp;lt;p&amp;gt;&quot;+$(this).attr('title')+&quot;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&quot;);
var my_tooltip = $(&quot;#&quot;+name+i);

var height = $('#' + name + i).height();
var width = $('#' + name + i).width();

var top  = $(this).offset().top - (height + 10);
var left = $(this).offset().left + ($(this).width() / 2) - (width / 2);

$(this).removeAttr('title').mouseover(function(){
my_tooltip.css({opacity:0.8, display:'none'}).fadeIn(400).css('left', left).css('top', top);
}).mousemove(function(kmouse){
my_tooltip.css({left:kmouse.pageX-125, top:kmouse.pageY-35});
}).mouseout(function(){
my_tooltip.fadeOut(400);
});

});
}

$(document).ready(function(){
simple_tooltip(&quot;#eurocopter-world a&quot;,&quot;tooltip&quot;);
});</pre>
<p>The CSS wasn&#8217;t hard to optimise and adjust, I kept qTips&#8217; graphics and styling, optimised, renamed classes and elements and applied:</p>
<pre class="brush: css;">
/*    TOOLTIP    */
div.tooltip { z-index: 999; text-align: center; position: absolute; font-size: .9em; width: 250px; background: transparent url(../img/arrow.png) no-repeat scroll center bottom; color: white; padding-bottom: 5px; display: none; }
div.tooltip p { background-color: #333; padding: 5px; font: normal normal .9em/1em Arial, verdana, sans-serif; text-transform: capitalize; }
</pre>
<p>I am now playing with the idea of introducing more colours, play with the opacity.. That&#8217;s it. Hope it helps others too.</p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/05/jquery-customised-tooltips-displaying-the-title-of-the-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>upgrade to latest jquery (v1.3.2) and thickbox photo gallery stops working</title>
		<link>http://docuview.co.uk/index.php/2009/04/upgrade-to-latest-jquery-v132-and-thickbox-photo-gallery-stops-working/</link>
		<comments>http://docuview.co.uk/index.php/2009/04/upgrade-to-latest-jquery-v132-and-thickbox-photo-gallery-stops-working/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 20:04:35 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[latest]]></category>
		<category><![CDATA[not working]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thickbox]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/blog/index.php/2009/04/upgrade-to-latest-jquery-v132-and-thickbox-photo-gallery-stops-working/</guid>
		<description><![CDATA[That&#8217;s exactly what happened to us today. New jQuery = faster, better, stronger, but ThickBox hasn&#8217;t been updated since August 2007 and it looks as though the new JS library got rid of some code/function Thickbox have been built around. Here&#8217;s the way how to deal with it: http://codylindley.com/thickboxforum/comments.php?DiscussionID=1791&#38;page=1#Item_5. As easy as removing the &#8220;@&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s exactly what happened to us today. New jQuery = faster, better, stronger, but ThickBox hasn&#8217;t been updated since August 2007 and it looks as though the new JS library got rid of some code/function Thickbox have been built around.</p>
<p>Here&#8217;s the way how to deal with it: <a title="fix thickbox gallery after upgrading to the latest jQuery how to" href="http://codylindley.com/thickboxforum/comments.php?DiscussionID=1791&amp;page=1#Item_5" target="_blank">http://codylindley.com/thickboxforum/comments.php?DiscussionID=1791&amp;page=1#Item_5</a>. As easy as removing the &#8220;@&#8221; on the 79th line of the thickbox.js, which as of jQuery version 1.3 is deprecated as explained in this post: <a title="ThickBox problem with jQuery 1.3" href="http://adipalaz.awardspace.com/thickbox_jquery13-en.html" target="_blank">http://adipalaz.awardspace.com/thickbox_jquery13-en.html</a>.</p>
<p>Cody Lindley: can we have ThickBox 4, please? <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We love ThickBox, we think it makes internet a better nicer place and we would love an update. Extended functionality. Documentation. Support. Maybe even a price..</p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/04/upgrade-to-latest-jquery-v132-and-thickbox-photo-gallery-stops-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>display PDF in Thickbox v3 (+jquery) &#8211; finally working!</title>
		<link>http://docuview.co.uk/index.php/2008/07/display-pdf-in-thickbox-v3-jquery-finally-working/</link>
		<comments>http://docuview.co.uk/index.php/2008/07/display-pdf-in-thickbox-v3-jquery-finally-working/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 14:26:49 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[docuview]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[modal window]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[solved]]></category>
		<category><![CDATA[thickbox]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[v3]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/blog/?p=55</guid>
		<description><![CDATA[Hi all! I&#8217;m super excited and would like to let you all know &#8211; especially the ones that have been stuck with a similar issue for some time: we have ThickBox working and running with DocuView and&#8230; DISPLAYING AUTOMATICALLY GENERATED PDFs (AS WELL AS NORMAL PDFs) IN MODAL WINDOW (and it works in FireFox 2+, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all!</p>
<p>I&#8217;m super excited and would like to let you all know &#8211; especially the ones that have been stuck with a similar issue for some time: we have ThickBox working and running with Docu<strong>View</strong> and&#8230; DISPLAYING AUTOMATICALLY GENERATED PDFs (AS WELL AS NORMAL PDFs) IN MODAL WINDOW (and it works in FireFox 2+, IE6+, IE7, Opera 9.51, Safari Win&#8230; Mac testing <span style="text-decoration: line-through;">follows</span> successfully completed).<span id="more-55"></span></p>
<p>The link that helped me: <a title="thickbox forum" href="http://codylindley.com/thickboxforum/comments.php?DiscussionID=303&amp;page=1" target="_blank">http://codylindley.com/thickboxforum/comments.php?DiscussionID=303&amp;page=1</a></p>
<p>I am still trying to get my head around the fact that the solution is as easy as adding all seven (7) characters: .show(). The forum member was solving displaying Flash, but it applies to PDF too.</p>
<p><strong><span style="color: #99cc00;">*NEW UPDATE!</span></strong> I&#8217;m really really chuffed, pleased and ecstatic, hope it helps, by all means check the <a title="edited Thickbox javascript file as used and demonstrated in DocuView - displaying PDF" href="http://docuview.co.uk/wp-content/themes/docuview/lib/thickbox.js">edited thickbox javascript file</a>. The changes occur on lines #196 and #199, one is meant to append the aforementioned &#8220;.show()&#8221; at the end of each occurrence of &#8220;&lt;/iframe&gt;&#8221; in the code.</p>
<p>Drop me a line should you struggle, drop me a line if it worked for you! Now we&#8217;re down to cracking generating PDF through COM (OpenOffice) via PHP.</p>
<p>Till then <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2008/07/display-pdf-in-thickbox-v3-jquery-finally-working/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
