Welcome guest, is this your first visit? Create Account now to join.
  • Login:

Welcome to the Diverse Solutions Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Jul 2014

    Automate the Property Slideshow Widget

    One of my clients was asking about why the Property Slideshow Widget isn't automated. As of the date of this post, it isn't. I looked at the way it's set up, and it wasn't hard to do it using a little jQuery and the javascript time functions, so I thought I would share it here in case anyone else wants to try it. Here's how:

    Step One
    Save the following code as “idxpress_slideshow_automate.js” in a “js” folder for your child theme. (You are using a child theme, aren’t you?)

    jQuery(document).ready(function() {
    	var idxslidesslideTimer, idxslidesslideTime = 5000;
    	idxslidesslideTimer = setInterval(idxslidesrunSlides, idxslidesslideTime);
    	function idxslidesrunSlides() { 
    	jQuery('body').on('mouseenter', '.dsidx-widget-slideshow', function () { 
    	jQuery('body').on('mouseleave', '.dsidx-widget-slideshow', function () { 
    		idxslidesslideTimer = setInterval(idxslidesrunSlides, idxslidesslideTime); 
    Step Two
    Add the code below to the functions.php of your child theme to add your new script to your site with jQuery as a dependency:
    function your_scripts() {
      $path = get_stylesheet_directory_uri();
      wp_enqueue_script( 'idxpress_slideshow_automate',  $path  . '/js/idxpress_slideshow_automate.js', array('jquery'), '1.0.0' );
    add_action( 'wp_enqueue_scripts', 'your_scripts' );
    Step Three
    Add the Property Slideshow Widget to the widget position where you want to use it and configure the settings to suit your site.
    Last edited by linux4me; 12-05-2015 at 08:40 AM. Reason: Updated the javascript to reduce the potential for conflicts with other plugins.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts