• Resolved Ramzii

    (@ramzii)


    Im looking to add a unique class or id to the class=”testimonial_slideri”

    I tried this code:

    <script type="text/javascript"> 
    
    		jQuery('.testimonial_slideri').each(function() {
    
    			var i;
    			i = i+1;
    
    			jQuery(this).addClass('testimonial_number_' + i);
    
    		}); 
    
    </script>

    But I keep getting NaN – not a number:

    <div class="testimonial_slideri testimonial_number-NaN" style="border: 0px solid rgb(221, 221, 221); width: 400px; height: 250px; background-color: transparent;">

    Please help, thank you.

    https://www.ads-software.com/plugins/testimonial-slider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @ramzii

    Thanks for writing to us.
    Please paste below code in your theme’s footer.php

    <script type="text/javascript">
    	var i=0;
    	jQuery('.testimonial_slideri').each(function() {
    		jQuery(this).addClass('testimonial_number_' + i);
    		i = i+1;
    	});
    </script>

    Let me know if it helps.
    Thank you,

    Best Regards,
    Sagar

    Thread Starter Ramzii

    (@ramzii)

    This solved it! Thanks for the very quick reply ??

    Hello @ramzii

    Thanks for using Testimonial Slider and writing to us. If Testimonial Slider has been helpful to you please post your rating at
    https://www.ads-software.com/extend/plugins/testimonial-slider/

    There is a rating section on this page where you can provide your rating about the plugin. In case your rating is less than 5, kindly let us know. We would like to hear your inputs so that we serve you with best slider and support.

    Best Regards,
    Sagar
    SliderVilla Support Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘adding a unique ID or class’ is closed to new replies.