Skip to content

Commit

Permalink
deploy: 255dea3
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofzerbe committed Oct 31, 2023
1 parent e70d006 commit 8061a13
Show file tree
Hide file tree
Showing 613 changed files with 1,561 additions and 1,540 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":"cloebeukl003qlxp76u1u2bkx"},{"name":"Misc","_id":"cloebeule003ulxp7bz9mg43k"},{"name":"Tools","_id":"cloebeulh003ylxp77ma6f71h"},{"name":"JavaScript","_id":"cloebeulk0044lxp7bklj3tvp"},{"name":"SQL","_id":"cloebeulo004alxp7fxexdld7"},{"name":"Photo","_id":"cloebeum1004ylxp78vvsfm4l"},{"name":".NET","_id":"cloebeum7005alxp70khiapj4"},{"name":"Football","_id":"cloebeuot00a0lxp7aq0m0h5r"}]}}
{"type":"getCategories","data":{"categories":[{"name":"UI/UX","_id":"cloec6hty003qlmp15nrm400n"},{"name":"Misc","_id":"cloec6hun003ulmp14icqdey4"},{"name":"Tools","_id":"cloec6hup003ylmp1ecmv8jm2"},{"name":"JavaScript","_id":"cloec6hur0044lmp1bfu54ous"},{"name":"SQL","_id":"cloec6hut004almp16my32dwr"},{"name":"Photo","_id":"cloec6hv2004ylmp1assges87"},{"name":".NET","_id":"cloec6hv7005almp150pmfwyl"},{"name":"Football","_id":"cloec6hx100a0lmp1byn0de3i"}]}}
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":"cloebeulk0044lxp7bklj3tvp"}],"tags":[{"name":"jQuery","_id":"cloebeulw004plxp75u62gqym"}],"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":"cloebeuh8000clxp74dcr0x18"}}
{"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":"cloec6hur0044lmp1bfu54ous"}],"tags":[{"name":"jQuery","_id":"cloec6huz004plmp11rum9nay"}],"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":"cloec6hrn000clmp157ji64at"}}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 8061a13

Please sign in to comment.