slideshow

Automatic slideshow with button

北城以北 提交于 2019-12-09 07:03:21
问题 I could create the automatic slideshow with a javascript. But I want it not only manual, but control with buttons. I added some manual controlling code. Then the slideshow was not working properly. This is the code for automatic slide show. How to modify this to work with buttons. var slideIndex = 0; showSlides(); function showSlides() { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); for (i = 0; i < slides.length; i++) {

Very Simple Image Slider/Slideshow with left and right button. No autoplay

空扰寡人 提交于 2019-12-08 23:49:16
问题 I'm trying to make a very, very simple image slider/slideshow with no autoplay please. I only want to go to next or prev image on click. Having some issues as you can read below. Here's the jsFiddle http://jsfiddle.net/HsEne/12/ (i just used background colors instead of images in the fiddle as well as switched img to divs but it's the exact same problem of course) The HTML: <div id="slider-wrapper"> <div id="slider"> <img class="sp" src="/img1.jpg"> <img class="sp" src="/img2.jpg"> <img class

array.eq() vs. array[] in Javascript and Jquery

会有一股神秘感。 提交于 2019-12-08 21:53:20
问题 When accessing an array, when is it appropriate to use the .eq() function? For example, I have... slides.eq(slidesLength-1).css("z-index", (slidesLength-1)); and later I have... for(i=0; i<slidesLength-1; i++) { $(slides[i]).css("left", "-100%"); } In the first piece of code, the slideshow stops functioning if I don's use the .eq() function. However, the second piece seems to function whether I use the .eq() function or not. Why is this? 回答1: slides is not an array. It's a jQuery object. The

Appying Javascript dynamically to videos within a slick.js Slider

自闭症网瘾萝莉.ら 提交于 2019-12-08 15:42:44
Fiddle Here Is it possible to have javascript that pauses a slide containing video for that video to play to completion on a specific slide #N instead apply to any slide containing an <video> ? I currently have this code to pause the slide when it reaches #5 for this example: $('.sliderMain').on('afterChange', function(event, slick, currentSlide){ if (currentSlide == 5) { $('.sliderMain').slick('slickPause'); theVideo.play(); And this code to resume the slide once the video finishes playing: document.getElementById('theVideo').addEventListener('ended',myHandler,false); function myHandler(e) {

Jquery div slideshow hiding child elements

北慕城南 提交于 2019-12-08 11:33:19
问题 I am trying to follow Jquery code for a div slideshow. Basically, I want to show div1 while hiding div2 (and vice-versa) with all the child elements of the visible div to be visible as well. The code below only show the first child elements of the visible div and hides all child elements and then show the child elements while hiding the former. Can someone please help figure out how to show a div and its child elements, while hiding the other sibling div s? Like a slideshow. Moreover, it

How to toggle between gallery-thumbnails and a specific slideshow-image on the same page?

99封情书 提交于 2019-12-08 11:25:54
问题 This is my first question, but I did read the guidelines. I hope you'll welcome me to the community with a straight answer. I'm working on a gallery-website where JQuery is not a dependency. I'm trying to switch between a thumbnails-view of all pictures and a slideshow-view showing only one picture, namely, the one picture whose thumbnail I clicked on. Also, I want the thumbnails-view and the slideshow-view to be separate, one to not show when the other does, but I want to have them both on

How can I get a list of images in a folder using javascript?

☆樱花仙子☆ 提交于 2019-12-08 10:36:31
问题 I have a folder tree like so: ProjectFolder img fjdkslajsd.jpg fjowefwask.jpg fweoifqadf.jpg ... scripts script.js jquery.js stylesheets styles.css index.html The index.html file pretty much just links to the scripts and stylesheet, and contains a div to hold my content. What I want to do is have the script.js find all the names of the images in the img folder and put them in a list so that I can later cycle through the list and display the images one by one. The end result would essentially

Advance slideshow manually with jquery

冷暖自知 提交于 2019-12-08 10:08:40
问题 please be easy - first post! Looking to modify the following script: http://jonraasch.com/blog/a-simple-jquery-slideshow Love it's simplicity, trying to find a way to add an advance function Preferably on the img or div - on click or from a link. Any suggestions? Appreciate the help edit , below is the script and here is a link to a working version: link to a live testing page script: function slideSwitch() { var $active = $('#slideshow IMG.active'); if ( $active.length == 0 ) $active = $('

slidejs: how to control two slides with same previous next button?

血红的双手。 提交于 2019-12-08 09:31:32
问题 How to control two slides with same prev, next button? When I click on prev/ next button I want both the slides to move.. How to achieve this functionality? JS Bin: http://jsbin.com/osogig/1/edit $(function() { $("#slides, #slides1").slides({ generatePagination : false, height : 50 }); }); <div id="slides"> <div class="slides_container"> <div>sample text 1</div> <div>sample text 2</div> <div>sample text 3</div> <div>sample text 4</div> </div> <a href="#" class="next"> Next </a>       <a href=

LibreOffice: a XSLT stylesheet to generate a slideshow?

我的未来我决定 提交于 2019-12-08 08:24:25
问题 A libreoffice document is a zip file containing (among other thing) some XML files. s$ unzip -t test.odp Archive: test.odp testing: mimetype OK testing: Configurations2/statusbar/ OK testing: Configurations2/accelerator/current.xml OK testing: Configurations2/floater/ OK testing: Configurations2/popupmenu/ OK testing: Configurations2/progressbar/ OK testing: Configurations2/menubar/ OK testing: Configurations2/toolbar/ OK testing: Configurations2/images/Bitmaps/ OK testing: content.xml OK