<?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>FlashBannerOnline &#187; Javascript</title>
	<atom:link href="http://blog.flashbanneronline.com/category/tutorials/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flashbanneronline.com</link>
	<description>Online Flash Banner Generator blog!</description>
	<lastBuildDate>Sun, 26 Jun 2011 11:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Edit the CSS styles of an element in Javascript</title>
		<link>http://blog.flashbanneronline.com/2009/10/edit-the-css-styles-of-an-element-in-javascript/</link>
		<comments>http://blog.flashbanneronline.com/2009/10/edit-the-css-styles-of-an-element-in-javascript/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 05:30:59 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[getElementById]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[styles]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=184</guid>
		<description><![CDATA[I’ve actually started to learn the Internet beast JavaScript, and I think it’s about time I shared some knowledge I’ve gathered from problems I had when starting out. The first of which is CSS styles. When starting out, one of the basic things I wanted to do was to change what the user sees dynamically. [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve actually started to learn the Internet beast JavaScript, and I think it’s about time I shared some knowledge I’ve gathered from problems I had when starting out.</p>
<p>The first of which is CSS styles. When starting out, one of the basic things I wanted to do was to change what the user sees dynamically. Not an easy task when there are few good examples online.</p>
<p>One of the first things you have to do is be able to find which element you want to change. For this you have to do a bit of “DOM” navigating, this scary thing is the Document Object Model, I don’t fully understand it yet myself, but from what little I do know, it reduces the HTML tags to objects. But that’s for another tutorial.</p>
<p>Here is an example basic HTML doc (with some inline JavaScript):</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;style type="text/css"&gt;
&lt;!--
.CellClass
{
	background-color:#CCC;
}
--&gt;
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
&lt;!--
function doThis()
{
// code to go here
}
--&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body onLoad="doThis()"&gt;

&lt;table width="300" border="1" cellspacing="5" cellpadding="0"&gt;
  &lt;tr&gt;
    &lt;td id="Cell01"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td id="Cell02"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>OK, so we’ve got a table and a class of “CellClass” applied to the cells. Also we have a JS function that runs once the body of our page has loaded.</p>
<p>Now, let’s edit that with JS! (all code below will be placed where “// code to go here” is in our JavaScript)</p>
<p>First, lets get a reference to one of our cells:</p>
<pre>document.getElementById('Cell01')</pre>
<p>Then we browse through to the style:</p>
<pre>document.getElementById('Cell01').style.backgroundColor = '#000000';</pre>
<p>That’s it! Test your page in a browser and see your background colour change!</p>
<p>Please note that this does not effect the actual class, this simply applies a style that overrides the class.</p>
<p>If anybody knows a method of actually altering the CSS classes, I’m open to suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2009/10/edit-the-css-styles-of-an-element-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple JQuery Expandable Content Box</title>
		<link>http://blog.flashbanneronline.com/2009/10/simple-jquery-expandable-content-box/</link>
		<comments>http://blog.flashbanneronline.com/2009/10/simple-jquery-expandable-content-box/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 04:10:50 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animate banner with jquery]]></category>
		<category><![CDATA[banner in jquery]]></category>
		<category><![CDATA[banner jquery]]></category>
		<category><![CDATA[banner jquery expandi lateral]]></category>
		<category><![CDATA[Content Box]]></category>
		<category><![CDATA[cs5 expandable banner]]></category>
		<category><![CDATA[diagonal expand div jquery]]></category>
		<category><![CDATA[expanable jquery and flash]]></category>
		<category><![CDATA[expand banner en flash et jquery]]></category>
		<category><![CDATA[expand banner en jquery]]></category>
		<category><![CDATA[expand jquery banner]]></category>
		<category><![CDATA[expand jquery lateral]]></category>
		<category><![CDATA[Expandable]]></category>
		<category><![CDATA[expandable banner as3 examples]]></category>
		<category><![CDATA[expandable banner flash tutorial]]></category>
		<category><![CDATA[expandable banner javascript]]></category>
		<category><![CDATA[expandable banner jquery]]></category>
		<category><![CDATA[expandable banner tutorial banner with jquery]]></category>
		<category><![CDATA[expandable banners jquery]]></category>
		<category><![CDATA[expandable banners tutorial html javascript]]></category>
		<category><![CDATA[expandable content box with jscript]]></category>
		<category><![CDATA[expandable context box with jquery]]></category>
		<category><![CDATA[expandable flash banner]]></category>
		<category><![CDATA[expandable flash banner tutorial]]></category>
		<category><![CDATA[expandable flash on cs5]]></category>
		<category><![CDATA[expandable list with content box]]></category>
		<category><![CDATA[expandable text box in php]]></category>
		<category><![CDATA[expanding banner jquery]]></category>
		<category><![CDATA[expanding banner on the left with jquery]]></category>
		<category><![CDATA[expanding banners jquery]]></category>
		<category><![CDATA[expando banner in jquery]]></category>
		<category><![CDATA[expando banner in jquery tutorial]]></category>
		<category><![CDATA[extendable banner jquery]]></category>
		<category><![CDATA[flash *rollover banner* examples]]></category>
		<category><![CDATA[flash - expandable banners tutorial]]></category>
		<category><![CDATA[flash as3 flash container div]]></category>
		<category><![CDATA[flash banner expand page with javascript]]></category>
		<category><![CDATA[flash banner tutorial]]></category>
		<category><![CDATA[flash expandable banner swfobject tutorial]]></category>
		<category><![CDATA[flash expandable banner tutorial]]></category>
		<category><![CDATA[flash expanding banner tutorial]]></category>
		<category><![CDATA[html content inside expandable a box]]></category>
		<category><![CDATA[html expandable banner tutorials]]></category>
		<category><![CDATA[javascript expandable box]]></category>
		<category><![CDATA[jquery banner]]></category>
		<category><![CDATA[jquery banner ad expand]]></category>
		<category><![CDATA[jquery banner blinds expanding mouseover]]></category>
		<category><![CDATA[jquery banner diagonal expand]]></category>
		<category><![CDATA[jquery banner example]]></category>
		<category><![CDATA[jquery banner expandable]]></category>
		<category><![CDATA[jquery banner websites]]></category>
		<category><![CDATA[jquery collapsible banners]]></category>
		<category><![CDATA[jquery copy text with url]]></category>
		<category><![CDATA[jquery css comment simple]]></category>
		<category><![CDATA[jquery expandable banner]]></category>
		<category><![CDATA[jquery expandable banner ad similar to iad]]></category>
		<category><![CDATA[jquery expandable banners]]></category>
		<category><![CDATA[jquery expandable box]]></category>
		<category><![CDATA[jquery expandable content]]></category>
		<category><![CDATA[jquery expandable div]]></category>
		<category><![CDATA[jquery expanding banner]]></category>
		<category><![CDATA[jquery expanding banner ad]]></category>
		<category><![CDATA[jquery expanding banner image]]></category>
		<category><![CDATA[jquery expanding banners]]></category>
		<category><![CDATA[jquery expanding header ad]]></category>
		<category><![CDATA[jquery map location rollover]]></category>
		<category><![CDATA[jquery overlay banner]]></category>
		<category><![CDATA[jquery resizable auto expanding text box]]></category>
		<category><![CDATA[jquery rollover banner]]></category>
		<category><![CDATA[jquery rollover location map caption out]]></category>
		<category><![CDATA[jquery simple expandable]]></category>
		<category><![CDATA[jquery simple expanding div over page]]></category>
		<category><![CDATA[map rollover jquery content]]></category>
		<category><![CDATA[overlay banner jquery]]></category>
		<category><![CDATA[show hide toggle javascript that popouts a div]]></category>
		<category><![CDATA[tutorial flash cs5 expandable banner]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=179</guid>
		<description><![CDATA[Just recently I have had to finally bite the bullet and learn some proper Javascript. Not just making text in input boxes disappear when the user clicks on them, I’m talking PROPER stuff like making boxes appear and disappear inside already existing content. This tutorial is written for JQuery but do not think that I [...]]]></description>
			<content:encoded><![CDATA[<p>Just recently I have had to finally bite the bullet and learn some proper Javascript. Not just making text in input boxes disappear when the user clicks on them, I’m talking PROPER stuff like making boxes appear and disappear inside already existing content.</p>
<p>This tutorial is written for JQuery but do not think that I would recommend JQuery over other frameworks such as MooTools. I personally like using JQuery as the CSS style traversing of the DOM is more intuitive to me, however I would recommend that you take a look and try all you can, you may prefer the style used by the other frameworks. To me MooTools came across as horribly complicated hence this tutorial is for JQuery.</p>
<h3>What does this tutorial do?</h3>
<p>It shows you how to make a preloaded content box appear and disappear when the user clicks a “View More” link. If you want a better idea check the <a title="Simple JQuery Expandable Content Box Demo" href="http://www.spydawebdesign.com/jquery-demo.html">demo page</a> I have created to go with this. It has the code included but I will also post it here. First off don’t forget to include the JQuery library, which you can download from the <a title="JQuery" href="http://jquery.com/">JQuery</a> site.</p>
<h3>THE HTML CODING</h3>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Simple JQuery Expanding Content&lt;/title&gt;
&lt;style type="text/css"&gt;
.outer-box {
width: 100%;
height: auto;
float: left;
}
.inner1 {
width: 98%;
border: 1px solid #ff0000;
}

.inner2 {
width: 98%;
border: 1px solid #ffff00;
}
&lt;/style&gt;
&lt;script type="text/javascript" src="link/to/jquery/library"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;some content&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Some extra content&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;a href="" title="View More"&gt;View More&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<h3>THE FINISHED CODE</h3>
<pre>$(".vm").toggle(function(){
$(this).parents("div").prev(".inner2").show('slow');
$(this).text("View Less");
$(this).attr("title", "View Less");
},function(){
$(this).parents("div").prev(".inner2").hide();
$(this).text("View More");
$(this).attr("title", "View More");
});</pre>
<p>Now if you’ve not done any Javascript before this probably looks like it did to me a pile of strangeness! Honestly though it is simple enough to understand.</p>
<p>If you’re just reading this for the code and don’t want to understand then just copy and paste it and run away. <strong>That’s it go on you free loader! Ctrl+C, Ctrl+V and runnnnnnnnnn! Don’t leave a comment or anything nooooo just run away!</strong></p>
<p>Sorry…</p>
<p>Ok, now to explain the code…if there’s anyone left.</p>
<p>First thing to explain is the very first line.</p>
<pre>$(function(){
});</pre>
<p>This is the same as typing</p>
<pre>$(document).ready(function(){
//some javascript stuff here
});</pre>
<p>If you don’t know the basics of JQuery this line ensures that the document is ready to be altered by your Javascript. There are reasons for this but I won’t be explaining them here. If you want to know why check the JQuery site, in particular the <a title="Getting started with JQuery" href="http://docs.jquery.com/Tutorials">getting started tutorials</a>.</p>
<p>As you can see by comparing the HTML and Javascript you should be able to spot that there is one containing box (class outer-box) are two boxes inside that container (classes inner1 and inner2), there is also one final div which contains the “View More” link. Your HTML does not need to resemble this but you will need to change any references to my classes and you may also have to alter some of the JQuery itself to make sure you are selecting the right divs.</p>
<p>After checking the document is ready to be used we hide the div containing the extra information which we want to show/hide.</p>
<pre>$(".inner2").hide();</pre>
<p>English translation:- Find something in the document with the class of inner2 and use the hide function with no parameters. This will remove it from view.</p>
<p>Once that is done I set up the event which fires off the code to show or hide the information.</p>
<pre>$(".vm").toggle(function(){

},function(){

});</pre>
<p>Right that looks a little more complicated than the last bit, lets check the English translation:-</p>
<p>If the user clicks anything with a class of vm (in this case our View More link) toggle between the next two functions. Now that sounds more reasonable doesn’t it? So I click it once it fires the first function, I click it again it fires the second. Easy!</p>
<p>OK Now I have two toggle states set up which will fire one after the other given clicks of the View More link. But what do I want it to do? Well if the information is visible I need to hide it and if it’s hidden I need to show it. As I know I have already hidden the content this makes things alot easier.</p>
<p>Our toggle code now becomes:-</p>
<pre>$(".vm").toggle(function(){
$(this).parents("div").prev(".inner2").show('slow');
},function(){

});</pre>
<p>English translation:- From the element which has fired this code, go up to it’s parent element and find anything with the class inner2 which is previous to where we are and apply the show function using the inbuilt parameter slow. This of course shows the element we wish to show. To hide it again we simple do the opposite.</p>
<pre>$(".vm").toggle(function(){
$(this).parents("div").prev(".inner2").show('slow');
},function(){
$(this).parents("div").prev(".inner2").hide();
});</pre>
<p>The observant amongst you will have noticed there is no nice styling to the hide. This is a usability concession, why would the user want it to gracefully disappear off of the screen, they clicked to get rid of it, they want it gone and gone yesterday!</p>
<p>The rest of the code is me being my OCD self. I don’t like the thought of someone clicking a link that says “View More” seeing the more pop out infront of them but still having the link say “View More” it should be “View Less” or words to that effect.</p>
<pre>$(".vm").toggle(function(){
$(this).parents("div").prev(".inner2").show('slow');
$(this).text("View Less");
},function(){
$(this).parents("div").prev(".inner2").hide();
$(this).text("View More");
});</pre>
<p>Also you can’t very well claim to be accesible if you don’t sort out the title for the link as well!</p>
<pre>$(".vm").toggle(function(){
$(this).parents("div").prev(".inner2").show('slow');
$(this).text("View Less");
$(this).attr("title", "View Less");
},function(){
$(this).parents("div").prev(".inner2").hide();
$(this).text("View More");
$(this).attr("title", "View More");
});</pre>
<p>The attr notation allows you to change almost any attribute of an HTML element.</p>
<p>Suprisingly enough that is it! If you load up your page and you can see the content which is supposed to be hidden there is something wrong with your code. Go back and make sure have all the brackets in the right place and all the semi-colons.</p>
<p>As written this code will also work for multiple elements such as a list of portfolio sites. As long as the class names stay the same it will work just fine.</p>
<p>I hope this is helpful to anyone, while I was researching how to do this there was no one tutorial which showed you this in it’s entirety…but now there is!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2009/10/simple-jquery-expandable-content-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Sliding Menu by MooTools Framework</title>
		<link>http://blog.flashbanneronline.com/2009/10/creating-a-sliding-menu-by-mootools-framework/</link>
		<comments>http://blog.flashbanneronline.com/2009/10/creating-a-sliding-menu-by-mootools-framework/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 14:03:34 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[content slide menu]]></category>
		<category><![CDATA[creating slider menu in html css]]></category>
		<category><![CDATA[css and javascript content slider framework]]></category>
		<category><![CDATA[css create box]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[how to create sliding menu codings]]></category>
		<category><![CDATA[javascript framework sliding box]]></category>
		<category><![CDATA[javascript slide effect tutorial]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[menu box sliding]]></category>
		<category><![CDATA[menu mootools]]></category>
		<category><![CDATA[mootools baner flash]]></category>
		<category><![CDATA[simple slide menu javascript]]></category>
		<category><![CDATA[slide menu in javascript]]></category>
		<category><![CDATA[Slideing]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=109</guid>
		<description><![CDATA[MooTools is an object oriented framework created in JavaScript that could be used to create a rich interactive experience in HTML pages similar to that achieved in Flash but without actually using Flash, the benefit of using the MooTools over Flash is that your content will be easily accessible by search engines and it will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mootools.net/">MooTools</a> is an object oriented framework created in JavaScript that could be used to create a rich interactive experience in HTML pages similar to that achieved in Flash but without actually using Flash, the benefit of using the MooTools over Flash is that your content will be easily accessible by search engines and it will not require the Flash player to be installed for it to run on any browser. Our tutorial here will show you how to create a sliding menu using the MooTools framework, you are required to have basic knowledge of HTML, you don&#8217;t need to know JavaScript to follow this tutorial, but JavaScript will help you understand what the code actually does.</p>
<p><img src="http://www.republicofcode.com/tutorials/webdevelopment/sliding_menu_mootools/sample.gif" alt="Sliding Menu - MooTools - Sample" width="320" height="71" /><br />
Click on the image above to see a sample of the sliding menu we&#8217;re going to create.</p>
<p>Our tutorial will be divided into three sections:</p>
<ol>
<li>Creating the HTML page containing our sliding menu.</li>
<li>Importing the MooTools JavaScript Framework.</li>
<li>Writing the JavaScript code required to create the sliding effect.</li>
</ol>
<h2><strong>Creating the HTML Page</strong></h2>
<p>Our HTML page will contain our actual content of the sliding menu. To create one open your your HTML editor and create a simple HTML page, the contents of the body should be as follows:</p>
<div>&lt;body&gt;<br />
&lt;div&gt;&amp;nbsp;&lt;/div&gt;<br />
&lt;div&gt;&amp;nbsp;&lt;/div&gt;<br />
&lt;/body&gt;</div>
<p>We will have to assign an <em>id</em> to each of our <em>div</em> tags, the first <em>div</em> should have have its <em>id</em> assigned as <em>menu_links</em>, and the second one as <em>menu</em>. You can now start putting your menu links in the first <em>div</em> as well.</p>
<div>&lt;div id=&#8221;menu_links&#8221;&gt;&lt;a href=&#8221;#&#8221;&gt;Oman3d&lt;/a&gt;|&lt;a href=&#8221;#&#8221;&gt;Tutorials&lt;/a&gt;&lt;/div&gt;<br />
&lt;div id=&#8221;menu&#8221;&gt;Menu&lt;/div&gt;</div>
<p>This concludes the HTML part of our tutorial. We will now import the MooTools JavaScript Framework and then start creating the effect using JavaScript.</p>
<p>Save this page anywhere on your hard drive.</p>
<h2>Importing the MooTools JavaScript Framework</h2>
<p>Start off by downloading the MooTools framework JavaScipt file from its official website, save the script in a folder named <em>scripts</em> to be located in the same directory as your HTML file. Back to your HTML page, you have to import our MooTools JS Framework into our HTML page <em>header</em>. You are required to type the code shown below to be able to do this.</p>
<div>&lt;header&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;scripts/mootools-release-1.11.js&#8221;&gt;&lt;/script&gt;<br />
&lt;/header&gt;</div>
<p>Our preparations are all done now. We need to start scripting our sliding motion now.</p>
<h2>Creating the Sliding Effect</h2>
<p>The code for our sliding effect is pretty short. You can simply copy and paste this code to do the trick. We will explain in the following paragraphs how it works. Paste this code anywhere in the <em>body</em> of your HTML page.</p>
<div>var mySlide = new Fx.Slide(&#8216;menu_links&#8217;);<br />
$(&#8216;menu&#8217;).addEvent(&#8216;click&#8217;,function(o3dEvent){<br />
o3dEvent = new Event(o3dEvent);<br />
mySlide.toggle();<br />
o3dEvent.stop();<br />
})</div>
<p>We start off by creating a new instance of the <em>Fx.Slide()</em> class and assigned it to the variable called <em>mySlide</em>. As you can see, we passed the parameter <em>menu_links</em> to the <em>Fx.Slide()</em> object when we created it and that is the <em>id</em> or the <em>div</em> element we would like to slide.</p>
<div>var mySlide = new Fx.Slide(&#8216;menu_links&#8217;);</div>
<p>We then created a click event for our  <em>div</em> element that has the <em>id</em> <em>menu</em> so that when the user clicks on this <em>div</em> element a function attached to the click event is executed. It is necessary to pass the identifier of our event to this function.</p>
<div>$(‘menu’).addEvent(‘click’,function(o3dEvent))</div>
<p>Our function shall execute the o3dEvent  as follows. We will examine it in detail now.</p>
<div>function(o3dEvent){<br />
o3dEvent = new Event(o3dEvent);<br />
mySlide.toggle();<br />
o3dEvent.stop();<br />
})</div>
<p>We create a variable called <em>o3dEvent</em> and assigned it to an event handler, which is a method to manage events happening on stage.</p>
<div>o3dEvent = new Event(o3dEvent);</div>
<p>Our function will carry out this simply job using the  <em>toggle()</em> method which slides in and out the element with the <em>id</em> <em>menu_links</em> as we have previously defined in our code.</p>
<div>mySlide.toggle();</div>
<p>We finally have to stop the event when sliding is finished.</p>
<div>o3dEvent.stop();</div>
<p>Our actual code for creating the effect is done, but you might want to give it a proper graphical look by applying a style to it using CSS . This code is to be placed in the <em>header</em> of the HTML page.</p>
<div>&lt;style&gt;<br />
div#menu_links{height:20px; padding:5px 0; background-color:#333333; border:#CCCCCC solid 1px; text-align:center; color:#FFFFFF }<br />
div#link_contanier{ background-color:#CCCCCC;}<br />
div#menu{ background:#CCCCCC; font-size:12px; text-align:center; cursor:pointer}<br />
&lt;/style&gt;</div>
<p>That should do it, you can now test your HTML page to see your click-able menu that expands once clicked. You can download a working source file of this tutorial here. This concludes our tutorial, you can visit the official <a href="http://www.mootools.net/">MooTools</a> website to learn more about it</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2009/10/creating-a-sliding-menu-by-mootools-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mouse wheel handler in Javascript</title>
		<link>http://blog.flashbanneronline.com/2009/10/mouse-wheel-handler-in-javascript/</link>
		<comments>http://blog.flashbanneronline.com/2009/10/mouse-wheel-handler-in-javascript/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 06:12:15 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[as3 mouse wheel handler]]></category>
		<category><![CDATA[banner flash with handlers]]></category>
		<category><![CDATA[flash banner with mouse]]></category>
		<category><![CDATA[javascript check event mousewheele which direction]]></category>
		<category><![CDATA[javascript mouse wheel]]></category>
		<category><![CDATA[javascript mousewheel direction]]></category>
		<category><![CDATA[Mouse wheel]]></category>
		<category><![CDATA[mousewheel javascript as3]]></category>
		<category><![CDATA[mousewheel js to flash]]></category>
		<category><![CDATA[mousewheel.js]]></category>
		<category><![CDATA[wheel handler]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=67</guid>
		<description><![CDATA[It returns a delta value, +1 or -1, according to scroll direction. Test : 1: up Meanwhile, check the original script. It needs some improvements due to some strange delta values on some browsers. &#60;html&#62; &#60;head&#62; &#60;script type=&#8220;text/javascript&#8221;&#62; function handle(delta) { var s = delta + &#8220;: &#8220;; if (delta &#60;0) s += &#8220;down&#8221;; else [...]]]></description>
			<content:encoded><![CDATA[<p>It returns a delta value, +1 or -1, according to scroll direction.<br />
<script src="http://www.emanueleferonato.com/scripts/mousewheel.js" type="text/javascript"></script><br />
<strong>Test :</strong></p>
<div id="delta">1: up</div>
<p>Meanwhile, check the original script.</p>
<p>It needs some improvements due to some strange delta values on some browsers.</p>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;text/javascript&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">function handle(delta) {</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">var s = delta + &#8220;: &#8220;;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">if (delta <span style="color: #009900;">&lt;0<span style="color: #66cc66;">)</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> s +<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;down&#8221;</span>;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> else</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> s +<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;up&#8221;</span>;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> document.getElementById<span style="color: #66cc66;">(</span><span style="color: #ff0000;">&#8216;delta&#8217;</span><span style="color: #66cc66;">)</span>.innerHTML <span style="color: #66cc66;">=</span> s;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #66cc66;">}</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;">function wheel<span style="color: #66cc66;">(</span>event<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> var delta <span style="color: #66cc66;">=</span> 0;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> if <span style="color: #66cc66;">(</span>!event<span style="color: #66cc66;">)</span> event <span style="color: #66cc66;">=</span> window.event;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> if <span style="color: #66cc66;">(</span>event.wheelDelta<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> delta <span style="color: #66cc66;">=</span> event.wheelDelta<span style="color: #66cc66;">/</span><span style="color: #800000;">120</span>; </span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> if <span style="color: #66cc66;">(</span>window.opera<span style="color: #66cc66;">)</span> delta <span style="color: #66cc66;">=</span> -delta;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> <span style="color: #66cc66;">}</span> else if <span style="color: #66cc66;">(</span>event.detail<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> delta <span style="color: #66cc66;">=</span> -event.detail<span style="color: #66cc66;">/</span><span style="color: #800000;">3</span>;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> <span style="color: #66cc66;">}</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> if <span style="color: #66cc66;">(</span>delta<span style="color: #66cc66;">)</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> handle<span style="color: #66cc66;">(</span>delta<span style="color: #66cc66;">)</span>;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #66cc66;">}</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #66cc66;">/</span>* Initialization <span style="color: #000066;">code</span>. *<span style="color: #66cc66;">/</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;">if <span style="color: #66cc66;">(</span>window.addEventListener<span style="color: #66cc66;">)</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"> window.addEventListener<span style="color: #66cc66;">(</span><span style="color: #ff0000;">&#8216;DOMMouseScroll&#8217;</span>, wheel, false<span style="color: #66cc66;">)</span>;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;">window.onmousewheel <span style="color: #66cc66;">=</span> document.onmousewheel <span style="color: #66cc66;">=</span> wheel;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;delta&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Scroll mouse wheel to see delta here.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></div>
<p>Do you have an idea about how to use mouse wheel handling? Let me know, and I will (try to) code it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2009/10/mouse-wheel-handler-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced
Database Caching 23/41 queries in 0.120 seconds using disk: basic
Object Caching 1654/1779 objects using disk: basic

Served from: blog.flashbanneronline.com @ 2012-02-11 13:33:30 -->
