Skip to content

Instantly share code, notes, and snippets.

View TommyZG's full-sized avatar

Tomislav TommyZG

View GitHub Profile
// ******************* Scroll to element's position
//get parameters are iteration of all objects selected by .selection
$(".selection").get(0).scrollIntoView();
// ******************* Check if checkbox is checked
$(".checkbox").on("change", function () {
if ($(this).is(":checked")) {
doSomething();
} else {
doSomething();
@TommyZG
TommyZG / laravel_da().php
Last active April 3, 2018 07:27
Laravel - dump all passed variables to array for easier read - alias for dd($x->toArray())
//add this to /vendor/laravel/framework/src/Illuminate/Support/helpers.php
if (! function_exists('da')) {
/**
* Dump the passed variables to array and end the script.
*
* @param mixed
* @return void
*/
function da()