save .addClass with jQuery cookie or local storage
I'm trying to save the .addClass every time I save a stylesheet so that the button remembers The user can toggle the option on/off. My simple html: <div id="btn-switch" class="btn-group" data-toggle="buttons"> <button class="btn btn-default" type="radio" name="options" id="option1" data-color="{T_THEME_PATH}/normal.css" autocomplete="off">off</button> <button class="btn btn-default" type="radio" name="options" id="option2" data-color="{T_THEME_PATH}/inverse.css" autocomplete="off">on</button> </div> This is my code: <script> $(document).ready(function() { if ($.cookie("css")) { $("#bg").attr(