Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery cross-slide

Posted on 2013-07-02
5
Medium Priority
?
533 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 600 total points
ID: 39292544
If you send us the live site maybe we can help more :D
0
 
LVL 44

Accepted Solution

by:
Chris Stanyon earned 900 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

886 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