-
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
378b007
commit b46b84c
Showing
598 changed files
with
1,480 additions
and
1,480 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
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"}]}} |
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/clo337i7k0009lfoxdq7dh9z2 → api/getPostById/clo349uc60009p7on4gunf8hg
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/clo337i7m000alfoxa4rigqjp → api/getPostById/clo349uca000ap7onh4mw2tbf
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/clo337i7m000blfox2i13ch4u → api/getPostById/clo349ucb000bp7on535qaigq
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/clo337i7n000clfoxf6m69c8i → api/getPostById/clo349ucb000cp7onc7k0hxh6
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":"clo337ib40041lfoxe660d5kw"}],"tags":[{"name":"jQuery","_id":"clo337ibe004mlfox2wmjg0re"}],"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":"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/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/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":"clo349ucb000cp7onc7k0hxh6"}} |
2 changes: 1 addition & 1 deletion
2
api/getPostById/clo337i7o000dlfoxcrqvflzd → api/getPostById/clo349ucc000dp7on73yu2v5l
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
api/getPostById/clo337i7p000elfox17fmeow4 → api/getPostById/clo349ucc000ep7on2lyq0m86
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.