javascript - Unable to write a var value inside owl-carousel options array -


var autoplayvalue = 6000;  $("#featureslide").owlcarousel({         navigation : true,         slidespeed : 600,         paginationspeed : 400,         //it not write var value instead string text         autoplay: autoplayvalue,         rewindspeed: 400,         stoponhover: true,         singleitem:true });  console.log('autoplay'+ autoplayvalue); 

the example above works demo @tushar . reason wasn't working because var value 60000 vs 6000. 1 0 made 60 seconds instead of 6 seconds... "all the. small things."

i gave try, , seems work fine. have @ codepen demo. couldn't guess why didn't work you, don't know trying initiate carousel exactly. initialising script:

$(document).ready(function() {   var autoplayvalue  = 2000;    $("#owl-demo").owlcarousel({     navigation : true,     slidespeed : 600,     paginationspeed : 400,     autoplay: autoplayvalue,     rewindspeed: 400,     stoponhover: true,     singleitem:true   }); }); 

i hope demo helps.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -