Skip to content

Commit

Permalink
deploy: 5dd1f9c
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofzerbe committed Oct 23, 2023
1 parent 378b007 commit b46b84c
Show file tree
Hide file tree
Showing 598 changed files with 1,480 additions and 1,480 deletions.
2 changes: 1 addition & 1 deletion api/getCategories/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type":"getCategories","data":{"categories":[{"name":"UI/UX","_id":"clo337iac003nlfoxba3v2uqr"},{"name":"Misc","_id":"clo337iaz003rlfox9vtx65iz"},{"name":"Tools","_id":"clo337ib2003vlfoxheznfswy"},{"name":"JavaScript","_id":"clo337ib40041lfoxe660d5kw"},{"name":"SQL","_id":"clo337ib70047lfox5d6x0i99"},{"name":"Photo","_id":"clo337ibi004vlfoxe3qy7ytc"},{"name":".NET","_id":"clo337ibn0057lfox11157hxg"},{"name":"Football","_id":"clo337idq009vlfox75wodmfj"}]}}
{"type":"getCategories","data":{"categories":[{"name":"UI/UX","_id":"clo349ues003np7on5hoih680"},{"name":"Misc","_id":"clo349uff003rp7on09r4dhlg"},{"name":"Tools","_id":"clo349ufh003vp7on81rb4tcp"},{"name":"JavaScript","_id":"clo349ufj0041p7onhv81937g"},{"name":"SQL","_id":"clo349ufm0047p7onbymz921s"},{"name":"Photo","_id":"clo349ufw004vp7ondl2r93td"},{"name":".NET","_id":"clo349ug10057p7onc8xac29m"},{"name":"Football","_id":"clo349uhv009vp7on73h17wk5"}]}}
2 changes: 1 addition & 1 deletion api/getLatest5Posts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/getLatestPost

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type":"getPostById","data":{"title":"Better Input Change Event","date":"2019-11-26T15:51:17.000Z","description":"<p>Often it is important to trigger an event, after the user of your website&#x2F;web app has filled out an text input. You have to do something with the given value in JavaScript.</p>\n<p>The intended event for this is <code>change</code>, which will be triggered, when the user has ended changing by leaving the input with his cursor, mostly by using the TAB key. This works at some degree, if there is a physical keyboard, but not really on mobile devices … and for me is leaving the field often too late to start the upcoming event.</p>","categories":[{"name":"JavaScript","_id":"clo337ib40041lfoxe660d5kw"}],"tags":[{"name":"jQuery","_id":"clo337ibe004mlfox2wmjg0re"}],"content":"<p>Often it is important to trigger an event, after the user of your website&#x2F;web app has filled out an text input. You have to do something with the given value in JavaScript.</p>\n<p>The intended event for this is <code>change</code>, which will be triggered, when the user has ended changing by leaving the input with his cursor, mostly by using the TAB key. This works at some degree, if there is a physical keyboard, but not really on mobile devices … and for me is leaving the field often too late to start the upcoming event.</p>\n<span id=\"more\"></span>\n\n<p>A better way to show the user the result of his entered value, could be the event <code>input</code> which fires on every key stroke, but could be way to often, if the triggered event is for example an AJAX call.</p>\n<p>Best solution is, to observe the users key strokes and trigger the event, when he stops typing. Then there is no extra action needed by the user and the event isn’t triggered multiple times. </p>\n<p>Here’s an implementation with jQuery:</p>\n<figure class=\"highlight javascript\"><table><tr><td class=\"gutter\"><pre><span class=\"line\">1</span><br><span class=\"line\">2</span><br><span class=\"line\">3</span><br><span class=\"line\">4</span><br><span class=\"line\">5</span><br><span class=\"line\">6</span><br><span class=\"line\">7</span><br><span class=\"line\">8</span><br><span class=\"line\">9</span><br><span class=\"line\">10</span><br></pre></td><td class=\"code\"><pre><span class=\"line\">$(<span class=\"string\">&quot;#my-text-input&quot;</span>).<span class=\"title function_\">keyup</span>(<span class=\"keyword\">function</span> (<span class=\"params\"></span>) &#123;</span><br><span class=\"line\"> <span class=\"keyword\">var</span> $this = $(<span class=\"variable language_\">this</span>);</span><br><span class=\"line\"> <span class=\"built_in\">clearTimeout</span>($.<span class=\"title function_\">data</span>(<span class=\"variable language_\">this</span>, <span class=\"string\">&#x27;timer&#x27;</span>));</span><br><span class=\"line\"> <span class=\"keyword\">var</span> wait = <span class=\"built_in\">setTimeout</span>(<span class=\"keyword\">function</span> (<span class=\"params\"></span>) &#123;</span><br><span class=\"line\"></span><br><span class=\"line\"> <span class=\"comment\">//do something with the value...</span></span><br><span class=\"line\"></span><br><span class=\"line\"> &#125;, <span class=\"number\">1000</span>);</span><br><span class=\"line\"> $(<span class=\"variable language_\">this</span>).<span class=\"title function_\">data</span>(<span class=\"string\">&#x27;timer&#x27;</span>, wait);</span><br><span class=\"line\">&#125;);</span><br></pre></td></tr></table></figure>\n\n<p>Important is to wipe and set the timer on every key up, to achive that the event will be executed after 1 second after the last key stroke only.</p>\n","_path":"post/Better-Input-Change-Event/","_link":"https://kiko.io/post/Better-Input-Change-Event/","_id":"clo337i7n000clfoxf6m69c8i"}}
{"type":"getPostById","data":{"title":"Better Input Change Event","date":"2019-11-26T15:51:17.000Z","description":"<p>Often it is important to trigger an event, after the user of your website&#x2F;web app has filled out an text input. You have to do something with the given value in JavaScript.</p>\n<p>The intended event for this is <code>change</code>, which will be triggered, when the user has ended changing by leaving the input with his cursor, mostly by using the TAB key. This works at some degree, if there is a physical keyboard, but not really on mobile devices … and for me is leaving the field often too late to start the upcoming event.</p>","categories":[{"name":"JavaScript","_id":"clo349ufj0041p7onhv81937g"}],"tags":[{"name":"jQuery","_id":"clo349uft004mp7on4row0x4v"}],"content":"<p>Often it is important to trigger an event, after the user of your website&#x2F;web app has filled out an text input. You have to do something with the given value in JavaScript.</p>\n<p>The intended event for this is <code>change</code>, which will be triggered, when the user has ended changing by leaving the input with his cursor, mostly by using the TAB key. This works at some degree, if there is a physical keyboard, but not really on mobile devices … and for me is leaving the field often too late to start the upcoming event.</p>\n<span id=\"more\"></span>\n\n<p>A better way to show the user the result of his entered value, could be the event <code>input</code> which fires on every key stroke, but could be way to often, if the triggered event is for example an AJAX call.</p>\n<p>Best solution is, to observe the users key strokes and trigger the event, when he stops typing. Then there is no extra action needed by the user and the event isn’t triggered multiple times. </p>\n<p>Here’s an implementation with jQuery:</p>\n<figure class=\"highlight javascript\"><table><tr><td class=\"gutter\"><pre><span class=\"line\">1</span><br><span class=\"line\">2</span><br><span class=\"line\">3</span><br><span class=\"line\">4</span><br><span class=\"line\">5</span><br><span class=\"line\">6</span><br><span class=\"line\">7</span><br><span class=\"line\">8</span><br><span class=\"line\">9</span><br><span class=\"line\">10</span><br></pre></td><td class=\"code\"><pre><span class=\"line\">$(<span class=\"string\">&quot;#my-text-input&quot;</span>).<span class=\"title function_\">keyup</span>(<span class=\"keyword\">function</span> (<span class=\"params\"></span>) &#123;</span><br><span class=\"line\"> <span class=\"keyword\">var</span> $this = $(<span class=\"variable language_\">this</span>);</span><br><span class=\"line\"> <span class=\"built_in\">clearTimeout</span>($.<span class=\"title function_\">data</span>(<span class=\"variable language_\">this</span>, <span class=\"string\">&#x27;timer&#x27;</span>));</span><br><span class=\"line\"> <span class=\"keyword\">var</span> wait = <span class=\"built_in\">setTimeout</span>(<span class=\"keyword\">function</span> (<span class=\"params\"></span>) &#123;</span><br><span class=\"line\"></span><br><span class=\"line\"> <span class=\"comment\">//do something with the value...</span></span><br><span class=\"line\"></span><br><span class=\"line\"> &#125;, <span class=\"number\">1000</span>);</span><br><span class=\"line\"> $(<span class=\"variable language_\">this</span>).<span class=\"title function_\">data</span>(<span class=\"string\">&#x27;timer&#x27;</span>, wait);</span><br><span class=\"line\">&#125;);</span><br></pre></td></tr></table></figure>\n\n<p>Important is to wipe and set the timer on every key up, to achive that the event will be executed after 1 second after the last key stroke only.</p>\n","_path":"post/Better-Input-Change-Event/","_link":"https://kiko.io/post/Better-Input-Change-Event/","_id":"clo349ucb000cp7onc7k0hxh6"}}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit b46b84c

Please sign in to comment.