• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

275

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.

Votes

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.

Votes

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