0

I want to create testimonial slider like this one https://codepen.io/pillotu/pen/weWzLE/ but it seems to be impossible to make its js work in the visual composer "raw js" content box.

jQuery(document).ready(function($) {
 //create the slider
 $('.cd-testimonials-wrapper').flexslider({
  selector: ".cd-testimonials > li",
  animation: "slide",
  controlNav: true,
  slideshow: false,
  smoothHeight: true,
  start: function() {
   $('.cd-testimonials').children('li').css({
    'opacity': 1,
    'position': 'relative'
   });
  }
 });
});

I've tried many ways I saw in the internet, like using w3schools and jsfiddle, but nothing helped.

PLEASE HELP

this is how my raw js box looks like

  • Could you be more clear about how it didn't work. For example is there any error appear in browser console? – Thinh Bui Jun 13 '17 at 00:59
  • No error message, no warning... it just wont work out. I save settings and when I apply to page, doesn't work. If you have visual-composer at Wordpress, you can try this and I bet you will get the same issue. – Plebe Versivo Jun 13 '17 at 14:26
  • Firstly, you can try to inspect your output html to make sure both html and js code exist (for example find the keyword cd-testimonials-wrapper). Secondly, in your case, I think implementing a custom shortcode is much better than embed code. – Thinh Bui Jun 14 '17 at 07:42

0 Answers0