{"id":538,"date":"2018-08-01T09:37:16","date_gmt":"2018-08-01T16:37:16","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=3207"},"modified":"2018-08-01T09:37:16","modified_gmt":"2018-08-01T16:37:16","slug":"input-field-with-localstorage-predictions","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=538","title":{"rendered":"Input Field with LocalStorage Predictions"},"content":{"rendered":"<p>This is a quick example showing how to give an input field &#8220;memory&#8221;. After you type something once and hit return it will be stored in `localStorage`. String values are ranked based on how often they are selected\/entered. I know people don&#8217;t like jQuery these days, seems this pen is from a time when I still used it. <\/p>\n<p><iframe height='300' scrolling='no' title='Predictor Smarty' src='\/\/codepen.io\/ZevanRosser\/embed\/614c7191e92d69f49dc7434462da075d\/?height=300&#038;theme-id=5318&#038;default-tab=js,result&#038;embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https:\/\/codepen.io\/ZevanRosser\/pen\/614c7191e92d69f49dc7434462da075d\/'>Predictor Smarty<\/a> by Zevan Rosser (<a href='https:\/\/codepen.io\/ZevanRosser'>@ZevanRosser<\/a>) on <a href='https:\/\/codepen.io'>CodePen<\/a>.<br \/>\n<\/iframe><\/p>\n<p>There&#8217;s definitely room for improvement here &#8211; but the key features are covered.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a quick example showing how to give an input field &#8220;memory&#8221;. After you type something once and hit return it will be stored in `localStorage`. String values are ranked based on how often they are selected\/entered. I know people don&#8217;t like jQuery these days, seems this pen is from a time when I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[161,160],"tags":[178,134,179],"class_list":["post-538","post","type-post","status-publish","format-standard","hentry","category-html5","category-javascript","tag-input","tag-javascript","tag-localstorage"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=538"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/538\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}