'Removing a class with local storage

I just started learning jquery. Therefore, I am still in the beginning stages.

I want to store a button using local storage. Simply what I want to do is just store the code below locally.

I want to remove the specified class after the button click function and store it in local storage.

$(document).ready(function() {
    $(".button").click(function() {
        $(".container").removeClass("content");
    });
});

Thanks to everyone who helped with this


I have such a class and I want to remove the content class with the click function.

<div class="container content" id="top">

enter image description here



Solution 1:[1]

you are probably looking for something like the following, also try to read the docs here .removeClass

$('#buttonId').on('click', function(){     
  $('#top').removeClass('content');
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 felmez