Jquery滑块移动

发布于 2025-01-01 05:56:03 字数 188 浏览 4 评论 0原文

我正在开发一个项目,我必须更改滑块的移动,但我不确定如何更改移动方向。现在它从右到左移动,但我想要从上到下移动。这是项目的链接我正在研究http://184.173.9.8/~intellis/isg/ 滑块位于右侧“合作伙伴”标题下。

I'm working on a project and i have to change the slider movement but i am not sure to how to change the movement direction.Right now it's moving from right to left but i want movement from up to down.Here is link of project on which i am working http://184.173.9.8/~intellis/isg/ the slider is located under Partner heading on right side.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泪之魂 2025-01-08 05:56:03

这里有一个示例 http://api.jquery.com/slideDown/ 您也可以使用css http://api.jquery.com/css/ 函数指定动画从哪里开始并使用 jQuery animate 将最终位置 http://api.jquery.com/animate/。使用第一个函数,您应该能够解决第二个函数的问题,您可以创建自己的动画。希望这会有所帮助。

Here you have an example http://api.jquery.com/slideDown/ you can also use the css http://api.jquery.com/css/ function to specify where does the animation start and use jQuery animate to put the final position http://api.jquery.com/animate/. With the first function you should be able to resolve your problem with the second one you can create your own animations. Hope this helps a little.

樱花坊 2025-01-08 05:56:03

1-您应该像这样更改 ul 的高度属性。

<ul id="home-widget-slider" style="height: 300px; width: 500px; left: -1000px; " class="anythingBase"><li class="cloned panel" style="width: 500px; height: 300px; "></ul>

2- 您应该隐藏除第一个之外的所有 li

$(function(){
 var i = 0;
  $("li").each(function(){
     if(i++>0)
       $(this).hide();
  })
})

3- 我看不到 javascript,但您应该对 li 执行此操作

$("#home-widget-slider li activePage").removeClass("activePage").slideUp(400).next().addClass("activePage").slideDown(300);

1- you should change the height attribute of ul like this.

<ul id="home-widget-slider" style="height: 300px; width: 500px; left: -1000px; " class="anythingBase"><li class="cloned panel" style="width: 500px; height: 300px; "></ul>

2- You should hide the all li except first

$(function(){
 var i = 0;
  $("li").each(function(){
     if(i++>0)
       $(this).hide();
  })
})

3- i couldnt see the javascript but you should do this for li

$("#home-widget-slider li activePage").removeClass("activePage").slideUp(400).next().addClass("activePage").slideDown(300);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文