I have a scenario where I am using display:none
to hide a div
, and this div
is supposed to be shown only when the user clicks on the + icon. However, I also want to ensure that if JavaScript is disabled, the div
is shown by default. How can I achieve this?
Unfortunately, I am unable to share the entire code at the moment.
jQuery(document).ready(function() {
jQuery('a#toggle').click(function() {
jQuery('#map').slideToggle(400);
return false;
});
});
CSS
#map {display:none}