Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/423.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery AnythingSlider插件与演示中的示例不一样_Javascript_Jquery_Anythingslider - Fatal编程技术网

Javascript jQuery AnythingSlider插件与演示中的示例不一样

Javascript jQuery AnythingSlider插件与演示中的示例不一样,javascript,jquery,anythingslider,Javascript,Jquery,Anythingslider,我使用的是AnythingSlider,它的工作方式与示例页面完全相同,只是示例页面工作正常,而我的页面不工作 我知道脚本至少正在运行,因为它创建了一些额外的带有类“cloned”的标记,但没有任何移动 文档头部的JavaScript: $(function () { $('#slider').anythingSlider({ easing: "swing", // Anything other than "linear" or "swing"

我使用的是AnythingSlider,它的工作方式与示例页面完全相同,只是示例页面工作正常,而我的页面不工作

我知道脚本至少正在运行,因为它创建了一些额外的带有类“cloned”的标记,但没有任何移动

文档头部的JavaScript:

$(function () {
   $('#slider').anythingSlider({
      easing: "swing",           // Anything other than "linear" or "swing" 
                                  // requires the easing plugin
      autoPlay: true,            // turns off the entire FUNCTIONALitY
      startStopped: false,       // force it to start stopped if autoplay is on
      delay: 3000,               // time between slide transitions in AutoPlay
      animationTime: 600,        // time the slide transition takes
      hashTags: true,            // Should links change the hashtag in the URL?
      buildNavigation: false,    // if true builds and 
                                  // list of anchor links to link to each slide
      pauseOnHover: false,       // pause on hover if true and autoPlay enabled
      startText: "Start",        // Start text
      stopText: "Stop",          // Stop text
      navigationFormatter: null  // Details at the top of the file on this use
   });
});

(jQuery and the plugin are externally called)
HTML

<div class="container_16 slider" id="slider">
  <div class="wrapper">
      <ul>
          <li>
              <?php echo html::image('resources/images/featuredweb.gif', array('alt' => ' ', 'class' => 'slider-icon')); ?>
              <?php echo html::image('resources/images/website.gif', array('alt' => ' ', 'class' => 'imgborder')); ?>
              <div class="content">
                  <h3>D'Portfolio Theme</h3>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque massa tortor, fermentum ut pellentesque eu, mollis vitae lectus. </p>
                  <strong>Client Name : john doe</strong><br />
                  <strong>Requirement : php / Mysql / Adobe / CSS</strong><br />
              </div>
          </li>
          <li>
              <?php echo html::image('resources/images/featuredweb.gif', array('alt' => ' ', 'class' => 'slider-icon')); ?>
              <?php echo html::image('resources/images/website.gif', array('alt' => ' ', 'class' => 'imgborder')); ?>
              <div class="content">
                  <h3>D'Portfolio Theme</h3>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque massa tortor, fermentum ut pellentesque eu, mollis vitae lectus. </p>
                  <strong>Client Name : john doe</strong><br />
                  <strong>Requirement : php / Mysql / Adobe / CSS</strong><br />
              </div>
          </li>
          <li>
              <?php echo html::image('resources/images/featuredweb.gif', array('alt' => ' ', 'class' => 'slider-icon')); ?>
              <?php echo html::image('resources/images/website.gif', array('alt' => ' ', 'class' => 'imgborder')); ?>
              <div class="content">
                  <h3>D'Portfolio Theme</h3>
                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque massa tortor, fermentum ut pellentesque eu, mollis vitae lectus. </p>
                  <strong>Client Name : john doe</strong><br />
                  <strong>Requirement : php / Mysql / Adobe / CSS</strong><br />
              </div>
          </li>
      </ul>    
  </div>
</div>

  • D'Portfolio主题 Lorem ipsum dolor sit amet,是一位杰出的献身者。奎斯克·马萨·托托、发酵剂和培伦特斯·欧盟、莫利斯·维塔·莱克图斯

    客户名称:john doe
    要求:php/Mysql/Adobe/CSS
  • D'Portfolio主题 Lorem ipsum dolor sit amet,是一位杰出的献身者。奎斯克·马萨·托托、发酵剂和培伦特斯·欧盟、莫利斯·维塔·莱克图斯

    客户名称:john doe
    要求:php/Mysql/Adobe/CSS
  • D'Portfolio主题 Lorem ipsum dolor sit amet,是一位杰出的献身者。奎斯克·马萨·托托、发酵剂和培伦特斯·欧盟、莫利斯·维塔·莱克图斯

    客户名称:john doe
    要求:php/Mysql/Adobe/CSS
插件示例页面如下:


我在这里大发雷霆。

我自己没有使用AnythingSlider插件,但我注意到您的class属性与他们的不同

你有:

 <div class="container_16 slider" id="slider">

他们有

 <div class="anythingSlider">

尝试将您的(和相关css)更改为



我用他们的css(而不是你的)测试了你的html,它正在工作。内容正在按预期移动


我建议以他们的css为例,将其修改为您想要的样式,因为插件似乎依赖于它。

粘贴无效。只需在这里发布您的代码。只需确保每行缩进4个空格即可。粘贴有效。我把它贴在那里是因为有相当多的代码。现在似乎是有效的。帕斯蒂之前说它不存在。奇怪的无论如何,如果pastie破产或丢失数据,这个问题就变得毫无意义了。最好在问题中加入代码
 <div class="container_16 anythingSlider" id="slider">
 <div class="container_16 slider anythingSlider" id="slider">