Category Archives: Javascript

Parse URL and Append Param using Javascript

Sample

 

Chart.js

Official

https://www.chartjs.org/docs/latest/charts/mixed.html

HTML

JS

PHP for Ajax

 

Add website shortcut to home screen on mobile by javascript

No implement yet.

manifest.json example:

Reference:

  1. https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen#How_do_you_use_it
  2. https://stackoverflow.com/questions/6162070/jquery-mobile-add-the-home-screen-options
  3. https://github.com/cubiq/add-to-homescreen

Javascript execute twice

iframe

 

Datatable Complete Example

Controller

Model

Javascript (index.js)

AjaxResponse Trait

 

Scroll Spy (Fixed footer)

Use  fixed on mobile could cause wrong position for unknown reason. Change value of “position” property should be the best solution.

 

Google Sign-in for Websites

Javascript Example

PHP (Laravel)

Reference:

Facebook Login (Javascript)

Sample Javascript:

PHP Example (Laravel)

Reference: