Category Archives: Javascript

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:

Handling Ajax Response Errors From Laravel Form Request Validation: lalavalidate.js

Usage:

 

footerCallback manipulation

Ajax Get summary info with data (dataSrc)

footerCallback

tfoot

Reference:

  1. dataSrc:
    https://datatables.net/reference/option/ajax.dataSrc
  2. dataSrc example:
    http://live.datatables.net/sagujiza/1/edit

Sync Scrollbar (Horizontal)

HTML

 

Javascript

 

lazy load app (horizontal)