Thursday, October 16, 2014

Dropdowns with autocomplete and synonyms

The Redesigned Country Selector:
'The technically correct term for this would be something like an “auto-complete text field with loose partial matching, synonyms and weighted results.”'

Thursday, May 22, 2014

Study guide for MS Exam 70-480

jQuery vs document performance testing

Facebook Debugger

Facebook debug tool:
"Enter a URL to see some helpful feedback about your page markup. Enter an access token to see its expiry and user."

Used it to check my og:image meta tags.

Getting parts of a URL without using regex

As this response on StackOverflow says, have the browser do it for you:

var a = document.createElement('a');
a.href = 'http://www.example.com:123/foo/bar.html?fox=trot#foo';

['href','protocol','host','hostname','port','pathname','search','hash'].forEach(function(k) {
    console.log(k+':', a[k]);
});

/*//Output:
href: http://www.example.com:123/foo/bar.html?fox=trot#foo
protocol: http:
host: www.example.com:123
hostname: www.example.com
port: 123
pathname: /foo/bar.html
search: ?fox=trot
hash: #foo
*/

Or, with jQuery:

var lnk = $('<a href="http://www.example.com:123/foo/bar.html?fox=trot#foo" />')[0];
$.each(['href','protocol','host','hostname','port','pathname','search','hash'], function(idx, k) { 
  console.log(k+':', lnk[k]); 
});

Sunday, May 4, 2014

Friday, January 24, 2014

IE11 Emulation and Conditional Comments

Conditional comments will work for IE9 and below emulation modes if meta X-UA-Compatible is set to the version that's being emulated.

From Conditional comments do not work when emulating document modes via F12 Developer Tools:
Conditional comments ... are only supported in legacy document modes of Internet Explorer (see http://msdn.microsoft.com/library/ms537512.aspx). In IE11 GA, legacy mode conditional comments are not enabled when choosing a document mode through F12 Developer Tools. Choosing a document mode through X-UA-Compatible, however, does enable conditional comments for the legacy mode.