Skip to content

Instantly share code, notes, and snippets.

View rahulcs's full-sized avatar
🌳

Rahul Chanila rahulcs

🌳
View GitHub Profile
@metapraveen
metapraveen / queryParamsToCSSProps.js
Last active September 18, 2018 21:14
using functions as mapper instead of imperatively creating a structure you need
/**
need to convert styles in query params to css props object
// e.g. if URL is like
http://localhost:8080/?header-color=0c1119
&header-background-color=fff
&body-color=000
&body-background-color=e5822d
&button-color=909694
&button-background-color=f442dc
&button-hover-color=2de5a8
@geuis
geuis / remote-typeahead.js
Created February 16, 2012 22:58
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications
<script>
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){
ev.stopPropagation();