Support » Plugin: WordPress Shortcodes » Make accordion to open during hover event (onmouseover)

  • Here’s one way to make the accordion shortcode generate an accordion that opens during a hover event instead of a click event.

    Go to wp-content > plugins > synved-shortcodes > synved-shortcode > script > base.js, line 36. Add this line: params.event = "mouseover"; The whole block looks like this:

    jQuery('.synved-section-list', context).removeClass('synved-section-list-nojs').each(function() {
    		var jthis = jQuery(this);
    		var params = { autoHeight: false, navigation : true };
    		if (jthis.hasClass('synved-sections-collapse'))
    			params.collapsible = true;
    		if (jthis.hasClass('synved-sections-collapse-always'))
    		{ = false;
    		params.event = "mouseover"; // Line to add

    Add that line and ALL your accordions will open during a hover event. Check out the plugin’s API for other options (courtesy of the jQuery UI Accordion team: )


  • The topic ‘Make accordion to open during hover event (onmouseover)’ is closed to new replies.