Skip to content

Instantly share code, notes, and snippets.

View madeinspace's full-sized avatar

Fabrice Million madeinspace

View GitHub Profile
@madeinspace
madeinspace / JS Custom event
Created September 25, 2012 00:38
Javascript custom event
//Listen to custom event
document.addEventListener("myCustomEvent", function(e) {
var object = e.detail.object;
log(e.detail.object +" has dispatched event: "+e);
});
// Dispatch custom event
this.myevent.initEvent("myCustomEvent", true, true);
@madeinspace
madeinspace / index.html
Created July 25, 2012 23:06
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Progress bar &middot; CodePen</title>
<!--
Copyright (c) 2012 Made in Space, http://codepen.io/madeinspace
Permission is hereby granted, free of charge, to any person obtaining
@madeinspace
madeinspace / jQuery UI Autocomplete custom CSS
Created July 18, 2012 06:33
jQuery UI Autocomplete custom CSS
/* Autocomplete
----------------------------------*/
.ui-autocomplete { position: absolute; cursor: default; }
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/* Menu
----------------------------------*/