How to store font size in local storage
<p>I have created a simple resizing font size for the user but having issue storing it in the local storage so that next time the user refreshes the page or revisit it'll set to be the desired font size. For the moment i only get a page to work when im on it once i leave it is all being reset.
<a href="https://jsfiddle.net/v77z0pzd/2/" rel="nofollow noreferrer">https://jsfiddle.net/v77z0pzd/2/</a></p>

<pre><code>$(document).ready(function () {

    var size = localStorage.getItem('size');

//min font size
var min=9;  

//max font size
var max=16; 

//grab the default font size
var reset = $('p').css('fontSize'); 

//font resize these elements
var elm = $('p.intro, p.ending');  

//set the default font size and remove px from the value
var size = str_replace(reset, 'px', ''); 

//Increase font size
$('a.fontSizePlus').click(function() {

    //if the font size is lower or equal than the max value
    if (size&lt;=max) {

        //increase the size
        size++;

        //set the font size
        elm.css({'fontSize' : size});
        localStorage.setItem('size', size);
    }

    //cancel a click event
    return false;   

});

$('a.fontSizeMinus').click(function() {

    //if the font size is greater or equal than min value
    if (size&gt;=min) {

        //decrease the size
        size--;

        //set the font size
        elm.css({'fontSize' : size});
    }

    //cancel a click event
    return false;   

});

//Reset the font size
$('a.fontReset').click(function () {

    //set the default font size 
     elm.css({'fontSize' : reset});     
});});
</code></pre>

<p>Where should i place localStorage.</p>