<?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>MXcode &#187; javascript</title>
	<atom:link href="http://mxcode.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://mxcode.com</link>
	<description>All about coding</description>
	<lastBuildDate>Fri, 13 Jan 2012 06:02:09 +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>Go to top function with slide effect</title>
		<link>http://mxcode.com/2010/03/go-to-top-function-with-slide-effect/</link>
		<comments>http://mxcode.com/2010/03/go-to-top-function-with-slide-effect/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 03:18:57 +0000</pubDate>
		<dc:creator>MXcode</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[slide]]></category>
		<category><![CDATA[top]]></category>

		<guid isPermaLink="false">http://mxcode.com/2010/03/go-to-top-function-with-slide-effect/</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 &#8230; <a href="http://mxcode.com/2010/03/go-to-top-function-with-slide-effect/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">var goto_top_type = -1;
var goto_top_itv = 0;
&nbsp;
function goto_top_timer()
{
  var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
  var moveby = 15;
&nbsp;
  y -= Math.ceil(y * moveby / 100);
  if (y &lt; 0) {
    y = 0;
  }
&nbsp;
  if (goto_top_type == 1) {
    document.documentElement.scrollTop = y;
  }
  else {
    document.body.scrollTop = y;
  }
&nbsp;
  if (y == 0) {
    clearInterval(goto_top_itv);
    goto_top_itv = 0;
  }
}
&nbsp;
function goto_top()
{
  if (goto_top_itv == 0) {
    if (document.documentElement &amp;&amp; document.documentElement.scrollTop) {
      goto_top_type = 1;
    }
    else if (document.body &amp;&amp; document.body.scrollTop) {
      goto_top_type = 2;
    }
    else {
      goto_top_type = 0;
    }
    if (goto_top_type &gt; 0) {
      goto_top_itv = setInterval('goto_top_timer()', 50);
    }
  }
}</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://mxcode.com/2010/03/go-to-top-function-with-slide-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>href and onclick method in &#8216;A&#8217; tag</title>
		<link>http://mxcode.com/2009/10/href-and-onclick-method-in-a-tag/</link>
		<comments>http://mxcode.com/2009/10/href-and-onclick-method-in-a-tag/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 09:25:43 +0000</pubDate>
		<dc:creator>MXcode</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://mxcode.com/2009/10/href-and-onclick-method-in-a-tag/</guid>
		<description><![CDATA[How to invoke onclick method but not go to the page head. 1 &#60;a href=&#34;#&#34; onclick=&#34;javascript:jsMethod();return false;&#34;&#62;a link&#60;/a&#62;]]></description>
			<content:encoded><![CDATA[<p>How to invoke onclick method but not go to the page head.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;#&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:jsMethod();return false;&quot;</span><span style="color: #339933;">&gt;</span>a link<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://mxcode.com/2009/10/href-and-onclick-method-in-a-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

