[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

responsive design question

Andrew Poulos

10/30/2014 4:24:00 AM

The site I'm working on has a menu in the left hand column. When the
viewport is narrow the menu collapsed to just the title (if you click on
the title the menu collapses/expands).

By default, the menu is collapsed for a narrow viewport but if
JavaScript is disabled then the user will have no way to expand the menu.

It means that the CSS media query that collapses the menu should only be
applied if JavaScript is enabled.

Does this mean that the CSS media query should be dynamically
created/applied with JavaScript so that if JavaScript is disabled then
the menu is left expanded?

Andrew Poulos
5 Answers

Thomas 'PointedEars' Lahn

10/30/2014 6:34:00 AM

0

Andrew Poulos wrote:

> By default, the menu is collapsed for a narrow viewport but if
> JavaScript is disabled then the user will have no way to expand the menu.
>
> It means that the CSS media query that collapses the menu should only be
> applied if JavaScript is enabled.
>
> Does this mean that the CSS media query should be dynamically
> created/applied with JavaScript so that if JavaScript is disabled then
> the menu is left expanded?

No.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Andrew Poulos

10/30/2014 8:47:00 AM

0

On 30/10/2014 5:34 PM, Thomas 'PointedEars' Lahn wrote:
> Andrew Poulos wrote:
>
>> By default, the menu is collapsed for a narrow viewport but if
>> JavaScript is disabled then the user will have no way to expand the menu.
>>
>> It means that the CSS media query that collapses the menu should only be
>> applied if JavaScript is enabled.
>>
>> Does this mean that the CSS media query should be dynamically
>> created/applied with JavaScript so that if JavaScript is disabled then
>> the menu is left expanded?
>
> No.

Thanks, that was what I was hoping for.

Andrew Poulos

Thomas 'PointedEars' Lahn

10/30/2014 1:30:00 PM

0

Andrew Poulos wrote:

> On 30/10/2014 5:34 PM, Thomas 'PointedEars' Lahn wrote:
>> Andrew Poulos wrote:
>>> By default, the menu is collapsed for a narrow viewport but if
>>> JavaScript is disabled then the user will have no way to expand the
>>> menu.
>>>
>>> It means that the CSS media query that collapses the menu should only be
>>> applied if JavaScript is enabled.
>>>
>>> Does this mean that the CSS media query should be dynamically
>>> created/applied with JavaScript so that if JavaScript is disabled then
>>> the menu is left expanded?
>>
>> No.
>
> Thanks, that was what I was hoping for.

Fascinating. What have you done instead?

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Andrew Poulos

10/30/2014 9:27:00 PM

0

On 31/10/2014 12:30 AM, Thomas 'PointedEars' Lahn wrote:
> Andrew Poulos wrote:
>
>> On 30/10/2014 5:34 PM, Thomas 'PointedEars' Lahn wrote:
>>> Andrew Poulos wrote:
>>>> By default, the menu is collapsed for a narrow viewport but if
>>>> JavaScript is disabled then the user will have no way to expand the
>>>> menu.
>>>>
>>>> It means that the CSS media query that collapses the menu should only be
>>>> applied if JavaScript is enabled.
>>>>
>>>> Does this mean that the CSS media query should be dynamically
>>>> created/applied with JavaScript so that if JavaScript is disabled then
>>>> the menu is left expanded?
>>>
>>> No.
>>
>> Thanks, that was what I was hoping for.
>
> Fascinating. What have you done instead?

I'm ignoring the issue because I surmised its unlikely that anyone on a
mobile device has disabled JavaScript (unless of course someone complains).

Andrew Poulos

Thomas 'PointedEars' Lahn

10/30/2014 9:41:00 PM

0

Andrew Poulos wrote:

> On 31/10/2014 12:30 AM, Thomas 'PointedEars' Lahn wrote:
>> Andrew Poulos wrote:
>>> On 30/10/2014 5:34 PM, Thomas 'PointedEars' Lahn wrote:
>>>> Andrew Poulos wrote:
>>>>> Does this mean that the CSS media query should be dynamically
>>>>> created/applied with JavaScript so that if JavaScript is disabled then
>>>>> the menu is left expanded?
>>>> No.
>>> Thanks, that was what I was hoping for.
>> Fascinating. What have you done instead?
>
> I'm ignoring the issue because I surmised its unlikely that anyone on a
> mobile device has disabled JavaScript (unless of course someone
> complains).

There are filtering proxies and antivirus apps, though.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not Cc: me. / Bitte keine Kopien per E-Mail.