• 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'))
    		{
    			params.active = false;
    		}
    
    		params.event = "mouseover"; // Line to add
    
    		jthis.accordion(params);
    	});

    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: https://api.jqueryui.com/accordion/#option-event )

    Cheers.

    https://www.ads-software.com/extend/plugins/synved-shortcodes/

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