responsive

onResume

  • Available since: v1.2
  • Type: event

Triggers when autoplay is resumed, i.e. when cursor leaves accordion's direct children .jAccordion-slidesWrapper.

Dependencies

The described event is triggered only if the below listed conditions were met.

  • autoplay: true
  • pauseOnHover: true

Callback creation

Callback can be attached to the event in the configuration section of the plugin:

$('selector').jAccordion({
	onResume : function(e) { 
		//Here goes your code, e.g. alert('Autoplay resumed and this slide should remain open for next ' + e.remainingTime + 'ms.');
		//You can call any API method using this.method()
	}
});

or it can be attached after initialization using API methods bind() or on():

$('selector').data('jAccordion').bind('onResume', function(e) { 
	//Here goes your code, e.g. alert('Autoplay resumed and this slide should remain open for next ' + e.remainingTime + 'ms.');
	//You can call any API method using this.method()
});

Event properties

Event object is a parameter of the callback and contains one or more attributes which store event-related info.

  • remainingTime - remaining time (in milliseconds) for which the active slide remains open

You can work with the event object like with any javascript object:

$('selector').jAccordion({
	onResume : function(e) { 
		//You can gain access to event property remainingTime using e.remainingTime
	}
});

Demo 1

Demo 1 demonstrates how to create your own function displaying when autoplay is paused and when it's resumed plus amount of time for which active slide should remain open. Demo also uses a callback attached to event onPause.

Loading content...
slide1
slide2
slide3
slide4
slide5

jAccordion by maniacpc, exclusively for CodeCanyon