Skip to content

Instantly share code, notes, and snippets.

View adamsilver's full-sized avatar

Adam Silver adamsilver

View GitHub Profile
h1 {
opacity: 0.5;
filter:alpha(opacity=50);
}
h1 {
opacity: 0.5;
filter:alpha(opacity=50);
background-color: #fff;
}
function MyClass() {
}
new MyClass() // instance of MyClass which is an object
function MyClass() {
return 1;
}
new MyClass() // instance of MyClass which is an object
function MyClass() {
return {val: 3};
this.val = 2;
}
new MyClass() // instance of MyClass which is an object with a property called val with a value of 3
function MyClass() {
return {val: 3};
this.val = 2;
}
new MyClass() // instance of MyClass which is an object with a property called val with a value of 3
function MyClass(someParam) {
if(!someParam) return null; // i can't do this
}
new MyClass() // this is not null
<!--[if !IE]><!-->
<link rel="stylesheet" type="text/css" href="css/normal.css" media="screen" />
<!-- <![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen" />
<![endif]-->
<!--[if gte IE 7]>
<link rel="stylesheet" type="text/css" media="screen" href="css/normal.css" />
<![endif]-->