When my adapted-for-no-javascript page loads, one of the styles loaded is this:
//accordion open
.accordionItemCollapsed, .accordionItem.is-collapsed {
max-height: 100%;
}
That way my accordion is all open and the content is visible for users without javascript.
But when a user that has javascript enabled visits the site, I would like the value to be changed automatically like this:
//accordion collapsed
.accordionItemCollapsed, .accordionItem.is-collapsed {
max-height: 0;
}
How do I best do that with jQuery?
This is probably quite elementary but I am new to jquery/JS and get a bit lost googling for solutions because all search hits seem to apply to much more complicated cases.
swaptag?This is probably quite elementary but I am new to jquery/JS and get a bit lost googling for solutions because all search hits seem to apply to much more complicated cases.Your research should have bring you to relevantcss()method, here is the DOC: api.jquery.com/css