WordPress Shortcodes
Make accordion to open during hover event (onmouseover) (1 post)

  1. nanoo_k
    Posted 3 years ago #

    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

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



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Shortcodes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by nanoo_k
  • This topic is not a support question
  • WordPress version: 3.5.1