<?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>ThinkRobot &#187; jTree</title>
	<atom:link href="http://think-robot.com/tag/jtree/feed/" rel="self" type="application/rss+xml" />
	<link>http://think-robot.com</link>
	<description>Design &#38; Development Blog</description>
	<lastBuildDate>Tue, 09 Aug 2011 16:56:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Nested sortable using jTree &#8211; clickable links</title>
		<link>http://think-robot.com/2008/11/nested-sortable-using-jtree-clickable-links/</link>
		<comments>http://think-robot.com/2008/11/nested-sortable-using-jtree-clickable-links/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 11:08:35 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jTree]]></category>

		<guid isPermaLink="false">http://www.think-robot.com/?p=17</guid>
		<description><![CDATA[jTree is a lightweight solution for nested, sortable lists based on jQuery. I&#8217;ve been trying to find a good solution for quite a while, however the only good competitor to jTree is now not compatible with the new jQuery (1.2.6). After getting fed up at work with including totally different sets of javascript files depending [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gimiti.com/kltan/wordpress/?p=29" target="_blank">jTree is a lightweight solution for nested, sortable lists based on jQuery</a>. I&#8217;ve been trying to find a good solution for quite a while, however the only good competitor to jTree is now not compatible with the new jQuery (1.2.6). After getting fed up at work with including totally different sets of javascript files depending on whether the nested sortable was needed on a page or not I have decided it was time for some clean-up.</p>
<p>Minimal is a very good word to describe <a href="http://www.gimiti.com/kltan/wordpress/?p=29" target="_blank">jTree</a>, which most of the time is good, however sometimes you might just want a little bit more. One of the biggest issues for me was lack of clickable links inside the <strong>LI</strong>s. Fortunately after some tweaking I came up with a hacky but working solution:</p>
<pre>if ($("#jTreeHelper").is(":not(:animated)") &amp;&amp; e.button !=2) {
 	//	Allow for clickable links
	<strong>if(new String(e.target).match(/(f|ht)tp(s{0,1}):///ig)){
 		return false;</strong><strong>
	}</strong>
	$("body").css("cursor","move");</pre>
<p>Just add the highlighted lines in the jquery.jtree.js file. Basically it just checks if the target of the click is a link and if it is it ignores the dragging.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2011/03/jquery-multiple-events-without-default-behaviour/" rel="bookmark">jQuery Multiple Events Without Default Behaviour</a></li><li><a href="http://think-robot.com/2009/04/regex-for-autolinking-urls/" rel="bookmark">Regex for Autolinking URLs</a></li><li><a href="http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/" rel="bookmark">Hitch. Object-oriented event handlers with jQuery</a></li><li><a href="http://think-robot.com/2011/06/wordpress-update-permission-issues/" rel="bookmark">WordPress update permission issues</a></li><li><a href="http://think-robot.com/2008/11/wordpress-nextgen-gallery-tweak/" rel="bookmark">WordPress NextGen gallery tweak</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2008/11/nested-sortable-using-jtree-clickable-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

