{"id":14228,"date":"2011-09-06T20:19:08","date_gmt":"2011-09-07T03:19:08","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14228"},"modified":"2011-09-06T20:19:08","modified_gmt":"2011-09-07T03:19:08","slug":"n","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/selectors\/n\/","title":{"rendered":"N"},"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":192767,"url":"https:\/\/css-tricks.com\/snippets\/sass\/fix-number-n-digits\/","url_meta":{"origin":14228,"position":0},"title":"Fix a Number to N Digits","date":"January 9, 2015","format":false,"excerpt":"When dealing with numbers in JavaScript or any other programming language, there is a way to truncate a number after n digits. Unfortunately, there is no such function in Sass. Still, rounding and precision issues do happen when dealing with percentage based grid systems for instance. Here is a Sass\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":163745,"url":"https:\/\/css-tricks.com\/snippets\/jquery\/get-query-params-object\/","url_meta":{"origin":14228,"position":1},"title":"Get Query Params as Object","date":"February 22, 2014","format":false,"excerpt":"Nicholas Ortenzio wrote this little plugin: jQuery.extend({ getQueryParameters : function(str) { return (str || document.location.search).replace(\/(^\\?)\/,'').split(\"&\").map(function(n){return n = n.split(\"=\"),this[n[0]] = n[1],this}.bind({}))[0]; } }); So if the URL is: http:\/\/codepen.io\/chriscoyier\/pen\/uszCr?lunch=sandwich&dinner=stirfry You can do: var queryParams = $.getQueryParameters(); And queryParams will be an object like: { \"lunch\": \"sandwich\", \"dinner\": \"stirfry\" }","rel":"","context":"With 21 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5091,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/comma-values-in-numbers\/","url_meta":{"origin":14228,"position":2},"title":"Put Comma Values in Numbers","date":"December 19, 2009","format":false,"excerpt":"This function assumes what is being submitted to it is a string, with a decimal point and two places after the decimal. To get your number into that format first, use this. Then this function will properly comma separate the number. For example, 2345643.00 will return 2,345,643.00 function CommaFormatted(amount) {\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13937,"url":"https:\/\/css-tricks.com\/almanac\/properties\/n\/","url_meta":{"origin":14228,"position":3},"title":"N","date":"August 31, 2011","format":false,"excerpt":"","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14230,"url":"https:\/\/css-tricks.com\/almanac\/selectors\/n\/nth-child\/","url_meta":{"origin":14228,"position":4},"title":":nth-child","date":"September 6, 2011","format":false,"excerpt":"The :nth-child selector allows you to select one or more elements based on their source order, according to a formula. \/* Select the first list item *\/ li:nth-child(1) { } \/* Select the 5th list item *\/ li:nth-child(5) { } \/* Select every other list item starting with first *\/\u2026","rel":"","context":"With 19 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":19305,"url":"https:\/\/css-tricks.com\/snippets\/javascript\/cookie-gettersetter\/","url_meta":{"origin":14228,"position":5},"title":"Cookie Getter\/Setter","date":"November 27, 2012","format":false,"excerpt":"\/** * Gets or sets cookies * @param name * @param value (null to delete or undefined to get) * @param options (domain, expire (in days)) * @return value or true *\/ _.cookie = function(name, value, options) { if (typeof value === \"undefined\") { var n, v, cookies = document.cookie.split(\";\");\u2026","rel":"","context":"With 4 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14228"}],"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=14228"}],"version-history":[{"count":1,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14228\/revisions"}],"predecessor-version":[{"id":14229,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14228\/revisions\/14229"}],"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=14228"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=14228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}