<?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>The Tutorial Blog &#187; quicktip</title>
	<atom:link href="http://www.thetutorialblog.com/tag/quicktip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thetutorialblog.com</link>
	<description></description>
	<lastBuildDate>Tue, 08 Nov 2011 19:21:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<image>
<link>http://www.thetutorialblog.com</link>
<url>http://www.thetutorialblog.com/wp-content/plugins/maxblogpress-favicon/icons/favicon-28.ico</url>
<title>The Tutorial Blog</title>
</image>
		<item>
		<title>Quick Tip: Resolving conflicting problems between jQuery and MooTools or any other Javascript library</title>
		<link>http://www.thetutorialblog.com/text-tutorials/quick-tip-resolving-conflicting-problems-between-jquery-and-mootools-or-any-other-javascript-library/</link>
		<comments>http://www.thetutorialblog.com/text-tutorials/quick-tip-resolving-conflicting-problems-between-jquery-and-mootools-or-any-other-javascript-library/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 23:51:10 +0000</pubDate>
		<dc:creator>Wez Pyke</dc:creator>
				<category><![CDATA[Text Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[conflict]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[quicktip]]></category>

		<guid isPermaLink="false">http://www.thetutorialblog.com/?p=155</guid>
		<description><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	Recently I wrote quite a huge chunk of jQuery for a website and it worked fine. A few days later I checked back to make sure that everything was working correctly after modifying a few things, but to my surprise none of the jQuery code worked. The problem was that I had added some Mootools [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thetutorialblog.com%2Ftext-tutorials%2Fquick-tip-resolving-conflicting-problems-between-jquery-and-mootools-or-any-other-javascript-library%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thetutorialblog.com%2Ftext-tutorials%2Fquick-tip-resolving-conflicting-problems-between-jquery-and-mootools-or-any-other-javascript-library%2F&amp;source=wezpyke&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Quick Tip: Resolving conflicting problems between jQuery and MooTools or any other Javascript library" alt=" Quick Tip: Resolving conflicting problems between jQuery and MooTools or any other Javascript library" /><br />
			</a>
		</div>
<p>Recently I wrote quite a huge chunk of jQuery for a website and it worked fine. A few days later I checked back to make sure that everything was working correctly after modifying a few things, but to my surprise none of the jQuery code worked. The problem was that I had added some Mootools code, the Mootools code worked fine but the jQuery code did not. I done some searching and found that the two libraries were conflicting and all it takes is 2 extra lines of code to prevent this from happening.</p>
<p><span id="more-155"></span></p>
<p>If you was to include jQuery and Mootools together this code below would not work:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>But if we simply add <em>jQuery(function($){</em> and <em>});</em> then this code would work the way that we have intended.</p>
<p>The code would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>More information</h2>
<p>I hope you found this quick tip useful, you can find out more about jQuery conflicts <a href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries">here</a>.</p>
<p>Feel free to leave a comment with your thoughts.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.thetutorialblog.com/text-tutorials/quick-tip-resolving-conflicting-problems-between-jquery-and-mootools-or-any-other-javascript-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP One Line IF Statement</title>
		<link>http://www.thetutorialblog.com/php/php-one-line-if-statement/</link>
		<comments>http://www.thetutorialblog.com/php/php-one-line-if-statement/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 22:31:31 +0000</pubDate>
		<dc:creator>Wez Pyke</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Text Tutorials]]></category>
		<category><![CDATA[else]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[quicktip]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.thetutorialblog.com/?p=35</guid>
		<description><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	I'm sure if you've been programming for a few years that you've come across when you need to check if something equals something than do something else a few times. Well the best way to do this is like so. Say for example we have a variable called $num and the value of it is [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[	<style>
	#code_div { border: 1px solid #DFF4B5; background-color: #F0FFD2; padding-left: 50px; padding:10px;}
	</style>
	
	<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fphp%2Fphp-one-line-if-statement%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thetutorialblog.com%2Fphp%2Fphp-one-line-if-statement%2F&amp;source=wezpyke&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="PHP One Line IF Statement" alt=" PHP One Line IF Statement" /><br />
			</a>
		</div>
<p>I'm sure if you've been programming for a few years that you've come across when you need to check if something equals something than do something else a few times.</p>
<p>Well the best way to do this is like so.</p>
<p>Say for example we have a variable called $num and the value of it is 5.<br />
<span id="more-35"></span><br />
You could store it in a variable.<br />
<div id="code_div">$code = ($num &gt; 0) ? "More than 0" : "Less than 0";</div></p>
<p>or you could print it straight to the users browsers<br />
<div id="code_div">echo ($num &gt; 0) ? "More than 0": "Less than 0";</div></p>
<p>So what happens here is if $num is greater than 0 print More than 0 else print Less than 0.</p>
<p>I hope you've found this quick tip helpful and use it throughout future projects.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.thetutorialblog.com/php/php-one-line-if-statement/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

