Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Andrew Gunn",
"label": "CTO & Co-Founder",
"summary": "I love solving problems using technology.",
"picture": "https://gravatar.com/avatar/fb5ba768e87a4cb19517ca1b4a4251ac?s=400&d=identicon&r=x",
"email": "hello@andrewgunn.co.uk",
"website": "https://www.andrewgunn.co.uk",
"location": {
"city": "Sheffield",
using System;
using System.Collections.Generic;
using System.Linq;
public class CharComparer : IEqualityComparer<char>
{
public bool Equals(char c1, char c2)
{
return char.ToLowerInvariant(c1) == char.ToLowerInvariant(c2);
}
  • Right click > Edit > Settings...
  • Tick "Save settings to user directory"
  • Console
    • Startup dir: C:\
    • Window size
      • Rows: 40
      • Columns: 140
    • Buffer size
      • Rows: 500
  • Appearance

#jQuery UK Advanced jQuery Training

https://gist.github.com/dcneiner/0c8505e1b19f804d628f

##Notes

  • Use event delegation e.g. $(document).on('click', 'a', function () { })
    • One bound event, instead of n
    • Complex selectors are no longer a performance issue because they're only used after each event, instead of DOM ready
  • element.id, instead of $(element).prop('id')
  • $(element).prop('href'), instead of element.href
;
(function ($, root, document, console, undefined) {
'use strict'
var consoleLog;
// Discrete log when collapsed.
// - Cycle through each new message and display for a set amount of time before moving onto the next one,
// or display like a <marqueue>?
// Fix the scrollToBottom function.
<!--[if lt IE 7]>ie6<![endif]-->
<!--[if IE 7]>ie7<![endif]-->
<!--[if IE 8]>ie8<![endif]-->
<!--[if IE 9]>ie9<![endif]-->
<!--[if !IE]><!-->other<!--<![endif]-->
;
(function (root, undefined) {
'use strict';
var toString = Object.prototype.toString;
if (toString.call(root.namespace) === '[object Function]') {
return;
}