toggle menu's child div color change on click and keep after refresh.
Hello ,
I made one menu in which there is three step.
First Main Div(Sports) then Child div(Country) and one more (League.)
In this when I click on Child div(Country) so that will change it's color and then when I refresh my page so that will keep that color.
I get that color when I click but when I refresh that Page so That
Div(Sports) contain that color and child div lost that color.
I made one demo which is
here.
- box2.click(function() {
$jq(this).next(widget2).slideToggle(200);
$jq(".widget2").not($jq(this).next(widget2)).stop(true, false).slideUp();
var box2ID = $jq(this).attr('id');
$jq(this).add(".disable").toggleClass("disable");
setCookie('box2id', box2ID);
});
$jq(".box").click(function() {
$jq(this).next(".inner").slideToggle(200);
$jq(".inner").not($jq(this).next(".inner")).stop(true, false).slideUp();
var boxID = $jq(this).attr('id');
$jq(this).add(".boxdis").toggleClass("boxdis");
setCookie('boxid', boxID);
});