Skip to content

Instantly share code, notes, and snippets.

@gyg-gists
gyg-gists / CSS: Styling submit button with CSS
Created June 25, 2012 17:56
CSS: Styling submit button with CSS for all browsers
input[type=button],input[type=submit]
{
border-right-color: black;
border-right-style: solid;
border-right-width: 1px;
border-left-color: black;
border-left-style: solid;
border-left-width: 1px;
border-bottom-color: black;
border-bottom-style: solid;
@gyg-gists
gyg-gists / paginated_collection.js
Created June 23, 2012 12:17 — forked from io41/paginated_collection.js
Backbone: pagination
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {
@gyg-gists
gyg-gists / gist:2978031
Created June 23, 2012 12:00 — forked from padolsey/gist:527683
javaScript: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@gyg-gists
gyg-gists / gist:2978009
Created June 23, 2012 11:52
HTML: Starting Template
<html>
<head>
<title></title>
<link rel="stylesheet" href="/css/style.css">
<script src="jquery-1.7.2.js" type="text/javascript"></script>
</head>
<body>