Check value of an object in localstorage

New Here ,
Dec 13, 2018 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.

Views

176

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
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 13, 2018 Dec 13, 2018

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.

Likes

Translate

Translate
Community Expert ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

LATEST

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.

Wappler, the only real Dreamweaver alternative.

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
community guidelines
express Get Adobe Express free

Easily make social graphics, flyers, logos, and more from thousands of free templates.

Get free app
Free to use, no credit card required