Solved

jquery cross-slide

Posted on 2013-07-02
5
511 Views
Last Modified: 2013-07-03
Hello Experts,

I am using the cross-slide jquery plugin (https://github.com/tobia/CrossSlide/blob/master/HOWTO.md).

My question is what if you have two slideshows in one page? How can it work with multiple slideshows?

This is how i use it as they explain:

$('#slideshow').crossSlide({
  sleep: 2,
  fade: 1
}, [
  { src: 'sand-castle.jpeg' },
  { src: 'sunflower.jpeg'   },
  { src: 'flip-flops.jpeg'  },
  { src: 'rubber-ring.jpeg' }
]);

Open in new window

0
Comment
Question by:Refael
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:TvMpt
ID: 39292473
What if you change only the id?? Just creat two block-level element (such as a div) and give them ID slideshow1 and slideshow2

$('#slideshow1').crossSlide({
  sleep: 2,
  fade: 1
}, [
  { src: 'sand-castle.jpeg' },
  { src: 'sunflower.jpeg'   },
  { src: 'flip-flops.jpeg'  },
  { src: 'rubber-ring.jpeg' }
]);

$('#slideshow2').crossSlide({
  sleep: 2,
  fade: 1
}, [
  { src: 'sand-castle.jpeg' },
  { src: 'sunflower.jpeg'   },
  { src: 'flip-flops.jpeg'  },
  { src: 'rubber-ring.jpeg' }
]);

Open in new window

0
 

Author Comment

by:Refael
ID: 39292491
TvMpt thak you for your reply.

I have tried it. for some reason it cause a conflict and it stops working.
If i knew for sure that this method should work fine i would have debug my script :-)
0
 
LVL 9

Assisted Solution

by:TvMpt
TvMpt earned 200 total points
ID: 39292544
If you send us the live site maybe we can help more :D
0
 
LVL 42

Accepted Solution

by:
Chris Stanyon earned 300 total points
ID: 39292723
If you look through the readme you will see that the author has acknowledged that this is from 2007 and as such is 'obsolete' - his advice is to use a different image slider, built on more up-to-date technology.

Don't waste any more time on a plug-in that is no longer supported. There are plenty of other, more modern ones out there.
0
 

Author Comment

by:Refael
ID: 39296130
Hi ChrisStanyon,

Really? No i haven't read the read-me file. There are so many going about this plugin in the NET that i was sure it is supported and up-to-date. 2007. Yes on some later projects i am working with the jQuery Cycle plugin which is really good too :-) Thank you for seeing that.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now