I'm going to take these out of order because I think that will make more sense:
3. when is featuredcontentslider.init() called?
As instructed on the demo page in the code block of Step 2, excerpt:
Code:
<script type="text/javascript">
featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "#increment", //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: [true, 3000], //[true/false, pausetime]
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
}
})
</script>
Notice the highlighted.
1. On the call of "javascript
:featuredcontentslider.jumpTo(
'slider1', 3)" " code, which function is called? I know HTML, DHTML, Javascript, css. I cannot understand the syntax of the above code. Is it a javascript code?
You mean:
Code:
<a href="javascript:featuredcontentslider.jumpTo('slider1', 3)">Go to 3rd slide within FCS with ID="slider1"</a>
Yes it's javascript. It tells slider1 to switch to 3rd tab. It could also be better written as:
Code:
<a href="#" onclick="featuredcontentslider.jumpTo('slider1', 3); return false;">Go to 3rd slide within FCS with ID="slider1"</a>
4. what are the possible attributes of featuredcontentslider.init()? I mean, how are they defined? From where the attributes came?
They are defined in the main script. You don't need to edit them there though because they are set in the init. These are explained in the section HTML and CSS Structure on the demo page.
2. In the HTML page of the above code, "1","2","3" are written but in the code I cannot see it. There is no code like "<p>1</p>".
See:
http://www.dynamicdrive.com/dynamici...suppliment.htm
Bookmarks