responsive

keepAspectRatio

  • Available since: v1.2
  • Type: option
  • Data type: Boolean
  • Allowed values: true, false
  • Default value: true

Specifies whether height is changed in the same proportion as width when onresize event occurs.

Example:

$('.accordion').jAccordion({
	responsive : true, //You don't even have to set this property because 'true' is default value
	keepAspectRatio : true	//You don't even have to set this property because 'true' is default value
});

Dependencies

The described option only takes effect if the below listed conditions were met.

  • responsive: true

Demo 1

Demo 1 demonstrates that height of the plugin is changed in the same proportion as width when you resize the browser window. Horizontal accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 2

Demo 2 demonstrates that height of the plugin is changed in the same proportion as width when you resize the browser window. Vertical accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 3

Demo 3 demonstrates that height of the plugin doesn't change even though width of the plugin does. Horizontal accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 4

Demo 4 demonstrates that height of the plugin doesn't change even though width of the plugin does. Vertical accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

jAccordion by maniacpc, exclusively for CodeCanyon