PDA

View Full Version : Content Slider 2.4 Help



dicegame
07-13-2008, 10:27 AM
1) Script Title:
Featured Content Slider 2.4

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

3) Describe problem:
Basically i have been customising the script (color/theme) wise, however i can't get something to work, and i've been going at it for about 3 days now. :(

Anyway, basically i want the pagination thing to look something like this:

http://www.totalgamerzone.com/forums/minisite/images/bar_no.gif

I want that image to be the bases for all contents...when not selected. And the image below is for content that is selected. Can someone somehow give me the code to do this?

http://www.totalgamerzone.com/forums/minisite/images/bar_yes.gif

I'd really appreciate it.

Best Regards,
Tom

ddadmin
07-13-2008, 05:31 PM
I'm not sure I understand. Are you merely trying to have the pagination links' background a solid color of black, unless the link in question is selected? How are you applying this background to the links (ie: via CSS? Please post a link to the page on your site that contains the problematic script so we can check it out.

dicegame
07-14-2008, 12:14 AM
I'll show you a picture of what i want. :)

http://img374.imageshack.us/img374/8892/testimagell4.jpg

That is what i want my content slider to look like....Now http://www.totalgamerzone.com/forums/minisite/images/bar_yes.gif that image is used when the current piece of content is selected...while http://www.totalgamerzone.com/forums/minisite/images/bar_no.gif is used when the current piece of content is not selected.

the current html i've got is:



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


<a href="#" class="toc"><img border="0" src="minisite/images/bar_no.gif"></a>
<a href="#" class="toc"><img border="0" src="minisite/images/bar_no.gif"></a>
<a href="#" class="toc"><img border="0" src="minisite/images/bar_no.gif"></a>
</div>

and my css is:




.pagination{
height: 40px;
width: 600px; /*Width of pagination DIV. Total width should equal slider's outer width (400+10+10=420)*/
text-align: left;
padding: 0px 10px;
}

.pagination a{
height: 40px;
width: 33px;
padding: 0 5px;
border: 0px;

}

#pagination a:hover, #pagination a.selected {
border: 0px;
}


I have tried inserting the background-image property for the pagination classes but that doesn't work....

ddadmin
07-15-2008, 05:56 AM
Since your pagination links are actual images, you can't use CSS to style the "selected" image by changing its src to a different image. What you need in this case is to make use of the script's onChange event handler. Assuming your pagination links look something like:


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

<a href="#" class="toc" style="margin-left: 35px"><img src="default.png" /></a> <a href="#" class="toc someclass"><img src="default.png" /></a> <a href="#" class="toc someotheclass"><img src="default.png" /></a> <a href="#" class="toc someotheclass"><img src="default.png" /></a>

</div>

By using the "markup" mode to manually specify the pagination HTML. Your initialization code then to get the selected pagination link's image to change to "selected.png" would look like:

<script type="text/javascript">

featuredcontentslider.init({
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.
revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
enablefade: [true, 0.2], //[true/false, fadedegree]
autorotate: [false, 3000], //[true/false, pausetime]
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
var toclinks=featuredcontentslider.settingcaches["slider2"].toclinks //reference all "toc" links within pagination DIV (array)
toclinks[previndex-1].firstChild.src="default.png"
toclinks[curindex-1].firstChild.src="selected.png"
}
})

</script>

dicegame
07-15-2008, 11:01 PM
Thank you so much!

You are awesome! :D

Gringo
12-12-2008, 06:26 AM
Hello guys !

This script is really wonderfull !!!

Just would like to know if it is possible to have an other transition effect ? :o

Thank you

P.S.
And maybe an other effect for the text like on websites you mentionned on the script's page ? (gamepost...)

Thanks :)