Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
image.png
js_array_search.html
js_browser_ip.html
js_disable_right_click.html
js_feature_test.html
js_form_clear.html
js_form_prevent_submit.html
js_native_ajax.html
js_page_timeout.html
js_save_load_form.html
js_scroll_to_top.html
js_time_duration.html
readme.MD
script.php

readme.MD

Javascript Snippets

A short (10) list of commonly used javascript code examples http://www.abrandao.com/2019/03/top-10-most-useful-jquery-javascript-code-snippets/

Installation

Simply clone or download the few files into your webserver or file directory. then simply open each page that has the snipped code.

For snippets that make use of Jquery I have included a CDN like to jquery as such

<script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>

If you wish to run them offline be sure to make a copy of the linked in code.

Usage

Install all snippets above on a supported web server or just open directly from your file server as needed.

Below is a breif description of what each web page and feature does. Refer to http://www.abrandao.com/2019/03/top-10-most-useful-jquery-javascript-code-snippets/
for a complete description

# HTML Page name Description
1 js_feature_test.html multiple examples of basic HTML Javascript feature detection
2 js_scroll_to_top.html simple example of how to scroll back to top
3 js_form_clear.html clear the contact form example
4 js_time_duration.html calculate time in terms of hh:mm:ss in duration from milliseconds
5 js_pagE_timeout.html Javascript page timeout after n seconds
6 js_save_load_form.html Example of Saving and Restoring a Form's data
7 js_disable_right_click prevent right-click on an image
8 js_browser_ip.html Jquery client side browser IP address check

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

TODO: Write history

Credits

TODO: Write credits

License

TODO: Write license.

You can’t perform that action at this time.