Skip to content

Instantly share code, notes, and snippets.

View essemme's full-sized avatar

Essemme essemme

View GitHub Profile
@ajaxray
ajaxray / select2-cascade.js
Last active November 23, 2022 07:27
Making Select2 (4.x) list boxes cascading / dependent. Options of a select2 list box will be loaded/refreshed by ajax based on selection of another select2 list box.
/**
* A Javascript module to loadeding/refreshing options of a select2 list box using ajax based on selection of another select2 list box.
*
* @url : https://gist.github.com/ajaxray/187e7c9a00666a7ffff52a8a69b8bf31
* @auther : Anis Uddin Ahmad <anis.programmer@gmail.com>
*
* Live demo - https://codepen.io/ajaxray/full/oBPbQe/
* w: http://ajaxray.com | t: @ajaxray
*/
var Select2Cascade = ( function(window, $) {
@msurguy
msurguy / DB.sql
Last active August 20, 2023 18:02
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik