Highlighted

Check value of an object in localstorage

New Here ,
Dec 13, 2018

Copy link to clipboard

Copied

I want to hide a div if the value of a localstorage object is true. See below screenshot of the Key which is _vxData and the object/array isUserLoggedIn. Using Jquery or vanilla js and css.

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

You need to retrieve the value from the local storage and use that value in a script to toggle/set the display property.

Have a look at Using the Web Storage API | MDN or Google the subject.

Views

129

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Check value of an object in localstorage

New Here ,
Dec 13, 2018

Copy link to clipboard

Copied

I want to hide a div if the value of a localstorage object is true. See below screenshot of the Key which is _vxData and the object/array isUserLoggedIn. Using Jquery or vanilla js and css.

Adobe Community Professional
Correct answer by BenPleysier | Adobe Community Professional

You need to retrieve the value from the local storage and use that value in a script to toggle/set the display property.

Have a look at Using the Web Storage API | MDN or Google the subject.

Views

130

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 13, 2018 0
Adobe Community Professional ,
Dec 13, 2018

Copy link to clipboard

Copied

You need to retrieve the value from the local storage and use that value in a script to toggle/set the display property.

Have a look at Using the Web Storage API | MDN or Google the subject.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 13, 2018 1