{"id":14160,"date":"2011-09-06T19:51:57","date_gmt":"2011-09-07T02:51:57","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14160"},"modified":"2011-09-06T19:51:57","modified_gmt":"2011-09-07T02:51:57","slug":"c","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/selectors\/c\/","title":{"rendered":"C"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1036,"featured_media":0,"parent":13708,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"page-almanac-group.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":""},"tags":[],"acf":[],"jetpack-related-posts":[{"id":8315,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/javascript-md5\/","url_meta":{"origin":14160,"position":0},"title":"JavaScript MD5","date":"January 15, 2011","format":false,"excerpt":"var MD5 = function (string) { function RotateLeft(lValue, iShiftBits) { return (lValue>(32-iShiftBits)); } function AddUnsigned(lX,lY) { var lX4,lY4,lX8,lY8,lResult; lX8 = (lX & 0x80000000); lY8 = (lY & 0x80000000); lX4 = (lX & 0x40000000); lY4 = (lY & 0x40000000); lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF); if (lX4 & lY4) {\u2026","rel":"","context":"With 22 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13915,"url":"https:\/\/css-tricks.com\/almanac\/properties\/c\/","url_meta":{"origin":14160,"position":1},"title":"C","date":"August 31, 2011","format":false,"excerpt":"","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":19750,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/strip-whitespace-from-string\/","url_meta":{"origin":14160,"position":2},"title":"Strip Whitespace From String","date":"January 5, 2013","format":false,"excerpt":"Whitespace, meaning tabs and spaces. Vanilla JavaScript (Trim Leading and Trailing) var str = \" a b c d e f g \"; var newStr = str.trim(); \/\/ \"a b c d e f g\" That method is ES 5, so just in case you could polyfill it (IE 8\u2026","rel":"","context":"With 6 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3801,"url":"https:\/\/css-tricks.com\/snippets\/css\/internationalization-language-css\/","url_meta":{"origin":14160,"position":3},"title":"Internationalization Language CSS","date":"September 4, 2009","format":false,"excerpt":"\/*Language-specific*\/ :lang(af){quotes:'\\201E' '\\201D' '\\201A' '\\2019';} :lang(ak){font-family:Lucida,\"DejaVu Sans\",inherit;} :lang(ar){font-family:Tahoma 12,Nazli,KacstOne,\"DejaVu Sans\",inherit;} :lang(bg){quotes:'\\201E' '\\201C' '\\201A' '\\2018';} :lang(bn){font-family:FreeSans,MuktiNarrow,Vrinda,inherit;font-size:1.1em;line-height:1.4em;} :lang(cs){quotes:'\\201E' '\\201C' '\\201A' '\\2018';} :lang(da){quotes:'\\00BB' '\\00AB' '\\203A' '\\2039';} :lang(de){quotes:'\\201E' '\\201C' '\\201A' '\\2018';} :lang(el){font-family:\"DejaVu Sans\",inherit;quotes:'\\00AB' '\\00BB' '\\2039' '\\203A';} :lang(en-GB){quotes:'\\2018' '\\2019' '\\201C' '\\201D';} :lang(es){quotes:'\\00AB' '\\00BB' '\\2039' '\\203A';} :lang(fa){font-family:Terafik,Traffic,Roya,Nazli,Nazanin,sans;font-size:1.5em;} :lang(fi){quotes:'\\201D' '\\201D' '\\2019' '\\2019';} :lang(fr){quotes:'\\ab\\2005' '\\2005\\bb' '\\2039\\2005' '\\2005\\203a';} :lang(hr){quotes:'\\00BB'\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":196692,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/cross-browser-dependency-free-dom-ready\/","url_meta":{"origin":14160,"position":4},"title":"Cross-Browser Dependency-Free DOM Ready","date":"February 24, 2015","format":false,"excerpt":"Denis Ciccale's version: var DOMReady = function(a, b, c) { b = document c = 'addEventListener' b[c] ? b[c]('DocumentContentLoaded', a) : window.attachEvent('onload', a) } DOMReady(function () { alert('The DOM is Ready!'); }); Minimized: var DOMReady = function(a,b,c){b=document,c='addEventListener';b[c]?b[c]('DOMContentLoaded',a):window.attachEvent('onload',a)} Dustin Diaz's version: function r(f){\/in\/.test(document.readyState)?setTimeout('r('+f+')',9):f()} He also had a repo for it where\u2026","rel":"","context":"With 3 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3568,"url":"https:\/\/css-tricks.com\/snippets\/jquery\/browser-detetction\/","url_meta":{"origin":14160,"position":5},"title":"Browser Detection + Apply Classes to HTML Element","date":"August 26, 2009","format":false,"excerpt":"\/\/ jQBrowser v0.2: http:\/\/davecardwell.co.uk\/javascript\/jquery\/plugins\/jquery-browserdetect\/ eval(function(p,a,c,k,e,d){e=function(c){return(c","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14160"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/1036"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=14160"}],"version-history":[{"count":1,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14160\/revisions"}],"predecessor-version":[{"id":14161,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14160\/revisions\/14161"}],"up":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/13708"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=14160"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=14160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}