-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8061a13
commit c1e00f5
Showing
1,122 changed files
with
13,838 additions
and
10,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"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"}]}} | ||
{"type":"getCategories","data":{"categories":[{"name":"UI/UX","_id":"clowt48of003pu3ouen74f7lm"},{"name":"Misc","_id":"clowt48oz003vu3ou3o77go67"},{"name":"Tools","_id":"clowt48p0003zu3ou4c9h3irm"},{"name":"JavaScript","_id":"clowt48p20045u3ou3bda398t"},{"name":"SQL","_id":"clowt48p4004du3ouhx4o2wa1"},{"name":"Photo","_id":"clowt48p9004zu3ou5zq69gc2"},{"name":".NET","_id":"clowt48pd005bu3ou4d7na2vw"},{"name":"Football","_id":"clowt48qp00a1u3ouabw4fqtf"}]}} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/cloec6hrk0009lmp1dstbb55r → api/getPostById/clowt48ml0009u3ou1ov42eu6
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/cloec6hrl000almp1951w2mkr → api/getPostById/clowt48mm000au3ouhwf33uef
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/cloec6hrm000blmp1cji75ana → api/getPostById/clowt48mn000bu3ouemrx8k2k
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/cloec6hrn000clmp157ji64at → api/getPostById/clowt48mo000cu3ou4509h7nl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/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/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\">"#my-text-input"</span>).<span class=\"title function_\">keyup</span>(<span class=\"keyword\">function</span> (<span class=\"params\"></span>) {</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\">'timer'</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>) {</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\"> }, <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\">'timer'</span>, wait);</span><br><span class=\"line\">});</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"}} | ||
{"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/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":"clowt48p20045u3ou3bda398t"}],"tags":[{"name":"jQuery","_id":"clowt48p7004qu3ou0cgodjyb"}],"content":"<p>Often it is important to trigger an event, after the user of your website/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\">"#my-text-input"</span>).<span class=\"title function_\">keyup</span>(<span class=\"keyword\">function</span> (<span class=\"params\"></span>) {</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\">'timer'</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>) {</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\"> }, <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\">'timer'</span>, wait);</span><br><span class=\"line\">});</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":"clowt48mo000cu3ou4509h7nl"}} |
2 changes: 1 addition & 1 deletion
2
api/getPostById/cloec6hrn000dlmp10g87bji1 → api/getPostById/clowt48mo000du3ou2pusd86h
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.