This file contains hidden or 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
| <form action="" method="post"> | |
| <input type="text" name="name" /> | |
| <button type="submit">Submit</button> | |
| </form> | |
| <div id="result"></div> | |
| <script type="src/javascript"> | |
| $.ajax({ | |
| type: 'POST', | |
| url: location.href, |
This file contains hidden or 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
| /** | |
| * Debouncer function to prevent multiple calls from a repeatedly called event | |
| * @link http://stackoverflow.com/a/4298672/187954 | |
| * @link https://gist.github.com/3649866 | |
| * @param {Function} callback A callback to execute when timeout is reached with no subsequent calls. | |
| * @param {Integer|null} timeout A custom timeout or null for 200 | |
| * @return {Function} The debouncer function. | |
| */ | |
| function eventDebouncer(callback, timeout) { | |
| timeout = timeout || 200; |
This file contains hidden or 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
| jQuery(function(){ | |
| var link = [ | |
| "Home", | |
| "About us", | |
| "Contact us" | |
| ]; | |
| var icon = [ | |
| "home", | |
| "user", | |
| "envelope" |
NewerOlder