javascript - Cycle2 slider with multiple divs - can only get it to work on JSFiddle -


my aim make slider has 2 divs. 1 text , 1 image alongside each other. however, have been unable trying own code @ home or cycle2 support pages. did manage find jsfiddle had been having similar issue. updated jsfiddle here , seems work , shows want achieve. bizarre thing if try same code on computer or if set own jsfiddle same code , external resources cannot make slider work.

the html:

<div class="cycle-slideshow"              data-cycle-fx="carousel"             data-cycle-timeout="3600"             data-cycle-slides="> div.home-block"            data-cycle-carousel-visible="1"             >  <div class="home-block"> <div class="brief"> </div><div class="examples"> </div> </div>  <div class="home-block"> <div class="brief"> </div><div class="examples"> </div> </div>  </div> 

and css

div.home-block {     height : 500px }  div.home-block div.brief {     width : 25% ;     height : 301px ;     background-color : black ;     color : white ;     font-family : arial ;     display : inline-block ;     vertical-align : top }  div.home-block div.examples {     width : 70% ;     height : 400px ;     background-image : url("http://www.luxurylifestylemag.co.uk/wp-content/uploads/2015/09/porsche911solo.jpg") ;     background-size : 100% ;     background-repeat : no-repeat ;     background-position : top ;     display : inline-block ;     vertical-align : top } 

i have tried lot of things, including putting divs inside list items, anchor tags, span classes. however, none of works me. using correct script tags reference cycle2. if simple slideshow images inside div work. however, divs inside divs not work - exception jsfiddle posted above.

i have put exact same code , external rescources in this jsfiddle, doesn't work. why not working?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -