Skip to content

Instantly share code, notes, and snippets.

<?php
class HomeController extends BaseController {
/*
|--------------------------------------------------------------------------
| Default Home Controller
|--------------------------------------------------------------------------
|
| You may wish to use controllers instead of, or in addition to, Closure
| based routes. That's great! Here is an example controller method to
@jasonlfunk
jasonlfunk / gist:2e7cd52814669aec561c
Created June 2, 2014 18:08
Automatically close Foundation5 off-canvas menu when resizing
$(document).ready(function() {
var $offCanvasWrap = $(".off-canvas-wrap");
$(window).resize(function() {
if(this.outerWidth > 640 && $offCanvasWrap.hasClass("move-right")) {
$(".exit-off-canvas").trigger("click");
}
});
});
@jasonlfunk
jasonlfunk / gist:911d58bb329e9c889ce8
Created June 3, 2014 20:09
Quick jQuery dom filter
$("[data-search-dom]").each(function(i,e) {
var timeout = null;
var $e = $(e);
var $target = $($e.data("search-dom"));
if($target.length > 0) {
$e.keyup(function() {
var search = $.trim($e.val());
window.clearTimeout(timeout);
timeout = setTimeout(function() {
if(search) {
Vue.component('select2', {
props: ['options', 'value'],
template: `
<div>
<select multiple ref='select'>
<slot></slot>
</select>
</div>
`,
mounted: function () {