Accordion content height

1766
1
Jump to solution
07-13-2016 12:48 PM
ShruthiSrinivasan1
New Contributor III

How do you change the height of the accordion content in a side accordion story map such that it's responsive? When I add the following to the index.html file, the height changes in the hosted story map. But, if the story map is resized and the page is maximized again, the accordion content reflects the height in the builder (default height). Only if the page is reloaded again, the accordion content has the modified height (eg: 500px).

              

                 /*

                 * Custom Javascript to be executed when the application is ready goes here

                 */

                $(".accordion-content").css("max-height", "500px");

                $(".accordion-content").css("height", "500px");

0 Kudos
1 Solution

Accepted Solutions
GregoryL_Azou
Occasional Contributor III

The application perform some check when resizing. I am not sure what's best in your case but if you use CSS !important you can fix this

.accordion-content {

  max-height: 500px !important;

}

or you can catch the window resize event and use setTimeout to execute your code after the app has performed what it has to do but I would not recommend that.

View solution in original post

1 Reply
GregoryL_Azou
Occasional Contributor III

The application perform some check when resizing. I am not sure what's best in your case but if you use CSS !important you can fix this

.accordion-content {

  max-height: 500px !important;

}

or you can catch the window resize event and use setTimeout to execute your code after the app has performed what it has to do but I would not recommend that.