Use tag to show/hide div when click when JavaScript is disabled. Tried adjusting following example Show hide divs on click in HTML and CSS without jQuery but that doesn't seem to work.
From this question How to detect if JavaScript is disabled? i assumed that there isn't a convenient way to check if JS is disabled like:
if(JS is disabled){
// show <a> tag that words with jQuery to display div
} else {
// show label to show/hide div onclick
}
Any ideas will be welcomed.
Question How to make "a" tag to show a mini login form stored in "div" when JavaScript is disabled. Because when it's enabled it ?
Below is coresponding code of tag "a" and "div".
<ul class="nav nav-bar pull-right" >
<li class="dropdown" id="menuLogin">
<a class="dropdown-toggle" href="#" for="_1" data-toggle="dropdown" id="navLogin">Login</a>
<div class="dropdown-menu" style="padding-left:17px; left:-70px; width:200px;">
<?php
$form_sm = $this->form_sm;
$form_sm->prepare();
echo $this->form()->openTag($form_sm);
?>
<dl class="form">
<dd><?php
echo $this->formElement($form_sm->get('email'));
echo $this->formElementErrors($form_sm->get('email'));
?></dd>
<dd><?php
echo $this->formElement($form_sm->get('password'));
echo $this->formElementErrors($form_sm->get('password'));
?></dd>
<li class="divider" style="width:78%"></li>
<dd><?php
echo $this->formElement($form_sm->get('send'));
echo $this->formElementErrors($form_sm->get('send'));
?></dd>
<?php echo $this->form()->closeTag() ?>
</div>
</li>
</ul>
It uses a Bootstrap3 and Zend Framework components and by clicking "a" tag following line
<li class="dropdown" id="menuLogin">
change to
<li class="dropdown open" id="menuLogin">