0

I want an element to be always displayed in desktop view and toggle-able in mobile view.

If user hides the element with javascript in mobile view and then resizes to desktop view it remains hidden (due to the javascript setting).

Is there any way to force it to stay visible in desktop view regardless of any javascript hiding?

Or do I need to define the element twice, once for mobile once for desktop?

1 Answer 1

3

Use JavaScript to apply a class which hides the element via CSS, rather than actually hiding the element directly.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.