Skip to content

Instantly share code, notes, and snippets.

View vinitkumar's full-sized avatar
🪀
Focusing

Vinit Kumar vinitkumar

🪀
Focusing
View GitHub Profile
// Render view helper
// if the request is coming from mobile and if you have a view
// with users.mobile.jade, then that view will be rendered
app.use(function (req, res, next) {
res._render = res.render
res.render = function (template, locals, cb) {
var ua = req.header('user-agent')
var fs = require('fs')
@vinitkumar
vinitkumar / x.md
Created January 4, 2013 14:48 — forked from Raynos/x.md

DOM Libraries, the easy way

  • [by. Select elements][1]
  • [fragment. Turn HTML into DOMFragments][2]
  • [class-list. Cross browser HTML5 classList implementation][3]
  • [dom-walk. Traverse the DOM in tree order][4]
  • [xhr. Minimal cross browser, cross domain XHR][5]
  • [insert. Cross browser DOM4 insertion methods][6]
  • [to-array. Convert nodelists into arrays][7]
  • [hidden. Cross browser HTML5 hidden property][8]