Tag: 下一个

将html5中的多个video列表交替存储为javascript数组

我在网络浏览器上设计了一个类似i-phone的屏幕,我正在测试这个应用程序,我正在构建。 它工作得很好,直到我想要调用另一组video。 什么有效 该应用程序的结构使得当用户看到屏幕时,她被引导到具有垂直video的频道。 左上角和右上角的按钮前进到下一个和上一个video。 Your browser does not support the video tag. 有一个“通道”按钮,如果按下该按钮,则向用户显示一个较小的窗口,用户可以通过单击第二组按钮和下一个按钮来查看其他通道。 Your browser does not support the video tag. jquery显示/隐藏较小的窗口: $(“.buttonTeardropChannelBlue”).click( function (){ if( $(“#bottomVid”).is(‘:visible’) ) { $(“#bottomVid”).hide(); } else { $(“#bottomVid”).show(); } }); 如果用户想要观看该特定频道,她可以点击较小的窗口,该窗口隐藏当前窗口并前进到另一个频道。 可以点击video,一旦发生这种情况,用户将被定向到下一个频道。 下面是完美地用于推进当前选择的video的代码,它包含以数组排列的video。 var Vids = (function() { var _currentId = -1; var _urls = [“videos/ParisisBurning_370x660_Get_Into_The_Suits_Vert.mp4″,”videos/ParisisBurning_370x660_School_Vert.mp4″,”videos/ParisisBurning_660x370_I_came_I_saw_Vert.mp4”, “videos/ParisisBurning_660x370_I_went_to_a_ball.mp4”]; // […]

jQuery:选择父div之外的下一个div

好吧,我觉得我错过了一些非常简单的东西但是这里有: 这段代码非常有用,完全符合我的要求。 单击链接,显示下一个div(页面上大约有10个) $(‘a.addtask’).click(function(){ $(this).next(‘.field’).slideToggle(); return false; }); Some content Add a task some other content 我想要做的是改变HTML就像这样(在div里面的链接): Some content Add a task some other content ^^哪个不再正常工作。 我需要在jquery中进行哪些更改才能使其工作? 我一直在谷歌搜索一段时间,类似的post中的一些解决方案似乎没有工作。

jQuery:这个:“$(this).next()。next()”有效,但是“$(this).next(’。div’)”没有

好的,我试图让这组信息单独隐藏。 More Information Bibendum Magna Lorem Cras mattis consectetur purus sit amet fermentum. A Second Group of Information Bibendum Magna Lorem Cras mattis consectetur purus sit amet fermentum. 当我键入它时它工作: $(“.arrow”).click(function() { $(this).next().next().slideToggle(); }); 但不是我这样做的时候: $(“.arrow”).click(function() { $(this).next(‘.box’).slideToggle(); }); 发生了什么让第二种选择不起作用? 我已经好几天了,不能把它弄清楚! 感谢您的投入!

如何使用jQuery循环兄弟姐妹?

我有以下代码: HTML: A B C D next! jQuery的: $(“#next”).click(function() { $(“.selected”).removeClass(“selected”).next().addClass(“selected”); }); 我想要的是循环容器中的div。 我可以这样做循环: $(“#next”).click(function() { if ($(“.selected”).next().length == 0) { $(“.selected”).removeClass(“selected”).siblings(“:nth-child(1)”).addClass(“selected”); } else { $(“.selected”).removeClass(“selected”).next().addClass(“selected”); } }); 但我认为有一种更简单的方法。 我怎样才能让它变得更简单? (我不介意你不使用next()函数)。 jsFiddle: http : //jsfiddle.net/S28uC/