Skip to content

Instantly share code, notes, and snippets.

View joeydaly's full-sized avatar

Joey Daly joeydaly

  • Melbourne, Australia
View GitHub Profile
/*!
* jQuery Typeahead
* Copyright (C) 2015 RunningCoder.org
* Licensed under the MIT license
*
* @author Tom Bertrand
* @version 2.3.2 (2016-01-13)
* @link http://www.runningcoder.org/jquerytypeahead/
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){window.Typeahead={version:"2.3.2"};var b={input:null,minLength:2,maxItem:8,dynamic:!1,delay:300,order:null,offset:!1,hint:!1,accent:!1,highlight:!0,group:!1,groupOrder:null,maxItemPerGroup:null,dropdownFilter:!1,dynamicFilter:null,backdrop:!1,backdropOnFocus:!1,cache:!1,ttl:36e5,compression:!1,suggestion:!1,searchOnFocus:!1,resultContainer:null,generateOnLoad:null,mustSelectItem:!1,href:null,display:["display"],template:null,correlativeTemplate:!1,emptyTemplate:!1,filter:!0,matcher:null,source:null,callback:{onInit:null,onReady:null,onShowLayout
.typeahead-field,.typeahead-query{position:relative;width:100%}.typeahead-button,.typeahead-dropdown>li>a{white-space:nowrap}.typeahead-button,.typeahead-container,.typeahead-field,.typeahead-filter,.typeahead-query{position:relative}.typeahead-container button,.typeahead-field input,.typeahead-select{border:1px solid #ccc;line-height:1.42857143;padding:6px 12px;height:32px}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}.typeahead-container,.typeahead-result.detached .typeahead-list{font-family:"Open Sans",Arial,Helvetica,Sans-Serif}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}.typeahead-container *{box-sizing:border-box}.typeahead-container *,.typeahead-field input{-webkit-box-sizing:border-box;-moz-box-sizing:border-b
@joeydaly
joeydaly / example.json
Created January 15, 2016 10:21
Example Json
{
"status":true,
"data":
[
{"id":"1","display":"melbourne","tag":"victoria"},
{"id":"2","display":"geelong","tag":"victoria"},
{"id":"3","display":"swan hill","tag":"victoria"},
{"id":"4","display":"brisbane","tag":"queensland"},
{"id":"5","display":"gold coast","tag":"queensland"},
]
<cfset lstNames = "Bob,Jane,TMart" />
<cfset arrNames = ListToArray(lstNames) />
<cfoutput>
<cfset idx = 1 />
<cfloop array="#arrNames#" index="name">
#idx# - #name#<br />
<cfset idx = idx + 1 />
</cfloop>
@joeydaly
joeydaly / gist:d1959884bc28d7138ed2
Created June 6, 2014 06:08
DBMigrate - references not working bug
<cfcomponent extends="joey.cfwheels.plugins.dbmigrate.Migration" hint="create player table">
<cffunction name="up">
<cfscript>
t = createTable(name='players');
t.string(columnNames='first_name', default='', null=true, limit='255');
t.string(columnNames='last_name', default='', null=true, limit='255');
t.timestamps();
t.create();
</cfscript>