responsive

scaleImgs

  • Available since: v1.2.1
  • Type: option
  • Data type: String
  • Allowed values: 'fitWidth', 'fitHeight', 'fit'
  • Default value: 'fit'

Specifies which method of scaling is applied to images with class jAccordion-img. Images without class jAccordion-img are not affected by this option.

Example:

$('.accordion').jAccordion({
	scaleImgs : 'fitWidth'
});

Methods of scaling

  • fitWidth - width of images is adjusted so it's same as width of a slide and height is changed in the same proportion
  • fitHeight - height of images is adjsuted so it's same as height of a slide and width is changed in the same proportion
  • fit - size of images is adjusted to completely fill the whole slide

Demo 1

Demo 1 demonstrates behaviour of the plugin with the described option set to 'fitWidth'. The second image doesn't have class jAccordion-img so the scaling method is not applied to it. Resize the window to see that size of images is adjusted correctly. Horizontal accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 2

Demo 2 demonstrates behaviour of the plugin with the described option set to 'fitWidth'. The second image doesn't have class jAccordion-img so the scaling method is not applied to it. Resize the window to see that size of images is adjusted correctly. Vertical accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 3

Demo 3 demonstrates behaviour of the plugin with the described option set to 'fitHeight'. The third image doesn't have class jAccordion-img so the scaling method is not applied to it. Resize the window to see that size of images is adjusted correctly. Horizontal accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 4

Demo 4 demonstrates behaviour of the plugin with the described option set to 'fitHeight'. The third image doesn't have class jAccordion-img so the scaling method is not applied to it. Resize the window to see that size of images is adjusted correctly. Vertical accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 5

Demo 5 demonstrates behaviour of the plugin with the described option set to 'fit'. The fourth image doesn't have class jAccordion-img so the scaling method is not applied to it. Resize the window to see that size of images is adjusted correctly. Horizontal accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

Demo 6

Demo 6 demonstrates behaviour of the plugin with the described option set to 'fit'. The fourth image doesn't have class jAccordion-img so the scaling method is not applied to it. Resize the window to see that size of images is adjusted correctly. Vertical accordion is used.

Loading content...
slide1
slide2
slide3
slide4
slide5

jAccordion by maniacpc, exclusively for CodeCanyon