Viewing 1 replies (of 1 total)
  • I’m not sure if you’ve figured it out or not but I thought I’d lend my findings.

    In order to change the time of the rotation, you’ll need to edit the jquery.quote_rotator.js file that’s located within the plugin’s directory (wp-content/plugins/ppm-testimonial/js).

    Once you open the jquery.quote_rotator.js file, find the following block of code:

    (function($) {
    
      $.quote_rotator = {
        defaults: {
          rotation_speed: 5000,
          pause_on_hover: true,
          randomize_first_quote: false,
          buttons: false
        }
      }
    
      $.fn.extend({
        quote_rotator: function(config) {
    
          var config = $.extend({}, $.quote_rotator.defaults, config);
    
          return this.each(function() {
            var rotation;
            var quote_list = $(this);
            var list_items = quote_list.find('li');
            var rotation_active = true;
            var rotation_speed = config.rotation_speed < 2000 ? 2000 : config.rotation_speed;

    You will need to change the time for the following items:

    rotation_speed: 5000,

    var rotation_speed = config.rotation_speed < 2000 ? 2000 : config.rotation_speed;

    Change the time frame (5000 and 2000) instances to whatever time that suits you best. When making this change, make sure you’re using the same number for all of the instances (I’ll provide my code at the bottom for clarification).

    Lastly, each thousand is set in milliseconds, so for example, if you want 8 seconds, you’ll need to change all of the instances above to 8000.

    Again, these are my findings and I’m not sure if this is the right way to go about it overall but it has worked for me so far. Below are the code changes I’ve made:

    (function($) {
    
      $.quote_rotator = {
        defaults: {
          rotation_speed: 10000,
          pause_on_hover: true,
          randomize_first_quote: false,
          buttons: false
        }
      }
    
      $.fn.extend({
        quote_rotator: function(config) {
    
          var config = $.extend({}, $.quote_rotator.defaults, config);
    
          return this.each(function() {
            var rotation;
            var quote_list = $(this);
            var list_items = quote_list.find('li');
            var rotation_active = true;
            var rotation_speed = config.rotation_speed < 10000 ? 10000 : config.rotation_speed;
Viewing 1 replies (of 1 total)
  • The topic ‘Change rotation speed?’ is closed to new replies.