this code is not working?can anyone tell me why?

时间:2018-02-03 11:05:10

标签: jquery

iam working on a web project..this is my jquery code..i tried several times and this code is not working..

jQuery(document).ready(function(){

  "use strict";

  $('#slider-carousel').carouFredSel({
    responsive:true,
    width:'100%',
    circular:true,
    scroll:{
      items:1,
      duration:700,
      pauseOnHover: true
    },
    auto:true,
    items:{
      visible:{
        min:1,
        max:1
      },
      height:"variable"
     },
  });

});

2 个答案:

答案 0 :(得分:0)

It looks that you've a comma after

height:"variable"}

I'm not sure (I cannot verify), but it looks wrong.

答案 1 :(得分:0)

in the document of plugin there is no value of height equal to "variable" and the values of height either "auto" or in "px" or %"

try change the the value of height

jQuery(document).ready(function(){

  "use strict";

  $('#slider-carousel').carouFredSel({
    responsive:true,
    width:'100%',
    circular:true,
    scroll:{
      items:1,
      duration:700,
      pauseOnHover: true
    },
    auto:true,
    items:{
      visible:{
        min:1,
        max:1
      },
      height:"auto"
     }
  });

});

you can read the index.html of the plugin

https://github.com/Codeinwp/carouFredSel-jQuery/blob/master/index.html