View Full Version : play button

06-11-2008, 02:07 PM
1) Script Title: featured content slider v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem: i am looking for a way to restart the slide show after someone has clicked on a page or number. maybe add a play/pause button?

06-11-2008, 07:20 PM
I'll try and post such an ability here (a button that plays/ pause the slideshow) later today.

06-11-2008, 09:24 PM
thank you very much!!!

06-12-2008, 06:40 PM
Sorry for the delay, I was busy updating the script (http://dynamicdrive.com/dynamicindex17/featuredcontentslider.htm) officially to v2.3 first. With that said, the attached modified .js file is based on v2.3, but supports a play/pause button that you can manually add to the pagination interface as a regular link:


The link looks like this:

<a href="javascript:featuredcontentslider.playpause('slider1')" style="font-family:Times New Roman">|| ►</a>

Where "slider1" is the ID of the main Featured Content Slider DIV. Since you'll be manually adding the link inside the pagination DIV, you'll need to make sure the parameter "toc" is set to "markup" first:

id: "slider2", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "markup", //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide.

Otherwise, the pagination links are dynamically generated, overwriting anything inside that DIV.

06-16-2008, 03:01 PM
thx for your reply, but when i add this, the pagination goes away & the " ||>" replaces it??? is that how its supposed 2 work? if so, that's not what i wanted, i wanted that in addition to the pagination.

06-17-2008, 03:43 AM
This occurs if you're not using the "markup", manual mode for manually defining the pagination links inside the pagination DIV. I mentioned this in my post above:

Since you'll be manually adding the link inside the pagination DIV, you'll need to make sure the parameter "toc" is set to "markup" first:

In other words, you'll need to switch the pagination mode to "markup", then manually define the pagination links, remembering to throw in the link for the pause/play button:

<div id="paginate-slider1" class="pagination">

<a href="http://google.com">Google</a> <a href="#" class="toc">My Dog</a> <a href="#" class="toc anotherclass">My Cat</a> <a href="#" class="toc">Bob and Sue</a> <a href="#" class="prev">&lt;</a> <a href="#" class="next">&gt;</a> <a href="javascript:featuredcontentslider.playpause('slider1')" style="font-family:Times New Roman">|| ►</a>


More on the "markup" mode here: http://www.dynamicdrive.com/dynamicindex17/contentslider_suppliment.htm

06-25-2008, 08:38 PM
WOW!!!! reading is fundamental, huh!!! LOL!!! thanks a bunch . . .

one more thing . . . when i want it to play, can i only have the pause symbol show & when it's pausing, i want the play symbol to show???

07-17-2008, 07:35 PM
hello admin. i see you've been busy upgrading the content slider . . . good deal. one thing i still haven't figured out was how to toggle the start/stop button you created for me? since the stop button is created in html . . . i'm not sure on how to change that in the .js file when its selected? any thoughts?

10-06-2008, 11:58 PM
sorry for reviving an old thread, but it's so useful.
you may need to add the below code:
setting.isplaying = true

under init:function(setting){} function of contentslider.js file
so users don't have to click twice to pause the running slides.

thanks for the great work, DD. :D