<?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>.one() &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/one/feed/" rel="self" type="application/rss+xml" />
	<link>https://sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Wed, 23 Dec 2015 12:56:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>.one() &#8211; Sibeesh Passion</title>
	<link>https://sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to make an event calls only once in JQuery</title>
		<link>https://sibeeshpassion.com/how-to-make-an-event-calls-only-once-in-jquery/</link>
					<comments>https://sibeeshpassion.com/how-to-make-an-event-calls-only-once-in-jquery/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Mon, 22 Jun 2015 07:50:58 +0000</pubDate>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[.one()]]></category>
		<category><![CDATA[call event once]]></category>
		<category><![CDATA[jquery events]]></category>
		<category><![CDATA[jquery one]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=5341</guid>

					<description><![CDATA[Today we will learn how we will learn how we can make an event to be fired only once in JQuery. This is a simple demo of JQuery .one() function. You may have gone through this situation in your development life. I hope you will like this. Background While I was doing some tasks, I wanted to make a click event which is to be fired only once for a user when the user is logged in. I used the JQuery .one function to do the requirement. So I thought of sharing you that. Using the code AS you all [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Today we will learn how we will learn how we can make an event to be fired only once in JQuery. This is a simple demo of JQuery .one() function. You may have gone through this situation in your development life. I hope you will like this. </p>
<p><strong>Background</strong></p>
<p>While I was doing some tasks, I wanted to make a click event which is to be fired only once for a user when the user is logged in. I used the JQuery .one function to do the requirement. So I thought of sharing you that.</p>
<p><strong>Using the code</strong></p>
<p>AS you all know we can handle so many events in client side by using JQuery. Hereby I am sharing you one of those event which will definitely help you one day in your application.</p>
<p>To start with load the JQuery reference. I am using Google CDN here.</p>
<p>[js]<br />
&lt;script src=&quot;https://code.jquery.com/jquery-2.1.4.min.js&quot;&gt;&lt;/script&gt;<br />
[/js]</p>
<p>Now we will create a &#8216;p&#8217; tag.</p>
<p>[html]<br />
&lt;p&gt;Click Me&lt;/p&gt;<br />
[/html]</p>
<p>What next? Style that &#8216;p&#8217; tag?</p>
<p>[css]<br />
 p {<br />
  color: red;<br />
  width: auto;<br />
  height: 50px;<br />
  margin: 250px;<br />
  border: 1px solid #ccc;<br />
  padding: 25px;<br />
  text-align: center;<br />
}<br />
[/css]</p>
<p>Now it is time to start our JQuery coding. For that we are going to create a document ready event and a click event.</p>
<p>[js]<br />
&lt;script&gt;<br />
$(document).ready(function(){<br />
	$(&quot;p&quot;).one( &quot;click&quot;, function() {<br />
	  $(this ).text(&quot;You clicked me!. Now you can&#8217;t do anything!!!!&quot;);<br />
	});<br />
});<br />
&lt;/script&gt;<br />
[/js]</p>
<p>So what does this .one() function does is, it will make sure that element&#8217;s click event is fired only once.</p>
<p><strong>Complete Code</strong></p>
<p>[html]<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
  &lt;title&gt;JQuery one demo &#8211; Sibeesh Passion&lt;/title&gt;<br />
  &lt;style&gt;<br />
 p {<br />
  color: red;<br />
  width: auto;<br />
  height: 50px;<br />
  margin: 250px;<br />
  border: 1px solid #ccc;<br />
  padding: 25px;<br />
  text-align: center;<br />
}<br />
  &lt;/style&gt;<br />
  &lt;script src=&quot;https://code.jquery.com/jquery-2.1.4.min.js&quot;&gt;&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;p&gt;Click Me&lt;/p&gt;<br />
&lt;script&gt;<br />
$(document).ready(function(){<br />
	$(&quot;p&quot;).one( &quot;click&quot;, function() {<br />
	  $(this ).text(&quot;You clicked me!. Now you can&#8217;t do anything!!!!&quot;);<br />
	});<br />
});<br />
&lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/html]</p>
<p>Now we will see the output.</p>
<p><strong>Output</strong></p>
<p><img decoding="async" src="http://www.sibeeshpassion.com/content/images/jqueryonedemo.gif" alt="" /></p>
<p><strong>Conclusion</strong></p>
<p>I hope you will like this article. Please share me your valuable thoughts and comments. Your feedback is always welcomed.</p>
<p>Thanks in advance. Happy coding!</p>
<p>Kindest Regards<br />
<a href="https://plus.google.com/+sibeeshkv" target="_blank">Sibeesh Venu</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://sibeeshpassion.com/how-to-make-an-event-calls-only-once-in-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
