<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by The Client Side of the Moon on Medium]]></title>
        <description><![CDATA[Stories by The Client Side of the Moon on Medium]]></description>
        <link>https://medium.com/@udidu?source=rss-c179a44359c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WoK54JKiFOHe-Tjhp6xFSg.jpeg</url>
            <title>Stories by The Client Side of the Moon on Medium</title>
            <link>https://medium.com/@udidu?source=rss-c179a44359c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:25:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@udidu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Please disable your page from scrolling when you open a Modal window]]></title>
            <link>https://medium.com/@udidu/please-disable-your-page-from-scrolling-when-you-open-a-modal-window-c5789aa8a838?source=rss-c179a44359c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5789aa8a838</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[The Client Side of the Moon]]></dc:creator>
            <pubDate>Tue, 05 Sep 2017 08:21:57 GMT</pubDate>
            <atom:updated>2017-09-05T08:21:57.148Z</atom:updated>
            <content:encoded><![CDATA[<p>Most of the web sites uses Modal windows to interact with their users, calling for an action. while the modal window is open, you can still scroll the page under the modal, what happen if your modal are scrollable too? you get a double scroll, one of the most annoying symptom on the web.</p><p>Here I’m going to show you a simple way to block the body from keep scrolling when a modal window is open.</p><h3>ADHD Helpers module</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1dc78344a5cf83b125f8439ac534dadb/href">https://medium.com/media/1dc78344a5cf83b125f8439ac534dadb/href</a></iframe><h3>Use the module</h3><p>Now, in your code, you can use this module like the following example:</p><pre>ADHDHelpers.disablePageScroll();</pre><pre>...showing a modal window...</pre><pre>...user close the modal...</pre><pre>ADHDHelpers.enablePageScroll();</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5789aa8a838" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Extending jQuery functions]]></title>
            <link>https://medium.com/@udidu/extending-jquery-functions-71bce7e9ba8?source=rss-c179a44359c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/71bce7e9ba8</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[jquery]]></category>
            <dc:creator><![CDATA[The Client Side of the Moon]]></dc:creator>
            <pubDate>Mon, 04 Sep 2017 11:58:00 GMT</pubDate>
            <atom:updated>2017-09-04T19:35:26.845Z</atom:updated>
            <content:encoded><![CDATA[<p>When developing with jQuery or any other JavaScript framework, sometimes we want to do more with the framework core functions. For example, many times, when I’m adding or removing a class to/from a jQuery element I want to call a function. If I’ll call a function every time I’m adding or removing classes right after the addClass or removeClass it will be hard to maintain the code.</p><p>In this post I’ll show how to expand jQuery core functions, as an example I will demonstrate how to add addClass and removeClass events to each jQuery element.</p><p>Let’s start by creating a closure to avoid variable conflicts:</p><pre>(function(){<br>    // code goes here...<br>})();</pre><p>Now, before the core functions override, we need to save them in order to call them later inside the expanded function</p><pre>(function(){</pre><pre>    // saving the core functions<br>    var coreAddClass = jQuery.fn.addClass;<br>    var coreRemoveClass = jQuery.fn.removeClass;<br>})();</pre><p>Core functions saved, now we can override them…</p><pre>(function(){</pre><pre>    // saving the core functions<br>    var coreAddClass = jQuery.fn.addClass;<br>    var coreRemoveClass = jQuery.fn.removeClass;<br>    <br>    // overriding the addClass function<br>    jQuery.fn.addClass = function(){ }</pre><pre>    // overriding the removeClass function<br>    jQuery.fn.removeClass = function(){ }<br>})();</pre><p>If you will run the code we wrote so far and try to $().addClass() or $().removeClass() nothing will happen. The next step is to add our new logic to the functions and then to call the core functions so we will keep the original behaviors</p><pre>(function(){</pre><pre>    // saving the core functions<br>    var coreAddClass = jQuery.fn.addClass;<br>    var coreRemoveClass = jQuery.fn.removeClass;</pre><pre>    // overriding the addClass function<br>    jQuery.fn.addClass = function(){</pre><pre>        // every time the addClass function is called<br>        // for this $element, trigger the addClass event           <br>        $(this).trigger(&#39;addClass&#39;, arguments);</pre><pre>        // calling the core function<br>        coreAddClass.apply(this, arguments);<br>    }</pre><pre>    // overriding the removeClass function<br>    jQuery.fn.removeClass = function(){</pre><pre>        // every time the removeClass function is called<br>        // for this $element, trigger the removeClass event <br>        $(this).trigger(&#39;removeClass&#39;, arguments);</pre><pre>        // calling the core function<br>        coreRemoveClass.apply(this, arguments);<br>    }<br>})();</pre><p>By applying the core function at the end of the function we are able to keep the original behavior of the core.</p><p><em>Originally published at </em><a href="http://udidu.blogspot.co.il/2012/11/expanding-jquery-functions.html"><em>udidu.blogspot.com</em></a><em> on November 18, 2012.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71bce7e9ba8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Facebook API with NodeJS]]></title>
            <link>https://medium.com/@udidu/facebook-api-with-node-js-c6bdc9827a63?source=rss-c179a44359c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6bdc9827a63</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[The Client Side of the Moon]]></dc:creator>
            <pubDate>Mon, 04 Sep 2017 01:57:00 GMT</pubDate>
            <atom:updated>2017-09-04T19:36:01.704Z</atom:updated>
            <content:encoded><![CDATA[<p>Facebook API is very powerful, it reveals a lot of data. Lets say that we want to work with the Facebook API from node.js to get some data from Facebook.<br> <br> In this post I will explain how to achieve this task, I assume that you already have a valid <a href="https://developers.facebook.com/docs/concepts/login/access-tokens-and-types/">access token</a> of a Facebook user, If you didn’t reach to this point, this <a href="http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/">link</a> will show you how to start.<br> <br><strong>The module</strong></p><p>The first thing is to build the module for Node, I want this module to be able to get a Facebook API open graph path (such as: /me/friends) and request the data from Facebook. In this module I choose to work with the <a href="http://nodejs.org/api/https.html">https</a> module, with this module I can make secured requests to Facebook via https.</p><p><strong>facebook.js</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/414e5a84905e402080e577156f237d70/href">https://medium.com/media/414e5a84905e402080e577156f237d70/href</a></iframe><p>Now, In your Node server, require this facebook module and call the get() function with the open graph api path that you want.</p><pre>var facebook = require(&#39;./facebook&#39;); </pre><pre>facebook.get(&#39;FB_ACCESS_TOKEN&#39;, &#39;/me/friends&#39;, function(data){<br>    console.log(data);<br>});</pre><p>The get() function generic, you can use it with any facebook api path, pass the access token of the user and a callback function to be called when the data is ready.</p><p><em>Originally published at </em><a href="http://udidu.blogspot.co.il/2012/11/facebook-api-with-nodejs.html"><em>udidu.blogspot.com</em></a><em> on November 7, 2012.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6bdc9827a63" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>