| 1 |
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 |
|
"http://www.w3.org/TR/html4/loose.dtd"> |
| 3 |
|
|
| 4 |
|
|
| 5 |
|
<HEAD> |
| 6 |
|
|
| 7 |
|
<link rel="stylesheet" type="text/css" href="contentslider.css" /> |
| 8 |
|
|
| 9 |
|
<script type="text/javascript" src="contentslider.js"> |
| 10 |
|
|
| 11 |
|
/*********************************************** |
| 12 |
|
* Featured Content Slider- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) |
| 13 |
|
* This notice MUST stay intact for legal use |
| 14 |
|
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more |
| 15 |
|
***********************************************/ |
| 16 |
|
|
| 17 |
|
</script> |
| 18 |
|
|
| 19 |
|
</HEAD> |
| 20 |
|
|
| 21 |
|
<BODY> |
| 22 |
|
|
| 23 |
|
<h2>Example 1</h2> |
| 24 |
|
|
| 25 |
|
<!--Inner content DIVs should always carry "contentdiv" CSS class--> |
| 26 |
|
<!--Pagination DIV should always carry "paginate-SLIDERID" CSS class--> |
| 27 |
|
|
| 28 |
|
<div id="slider1" class="sliderwrapper"> |
| 29 |
|
|
| 30 |
|
<div class="contentdiv"> |
| 31 |
|
Content 1 Here. <br /> |
| 32 |
|
<p></p><a href="javascript:featuredcontentslider.jumpTo('slider1', 3)">Go to 3rd slide</a></p> |
| 33 |
|
</div> |
| 34 |
|
|
| 35 |
|
<div class="contentdiv"> |
| 36 |
|
Content 2 Here. |
| 37 |
|
</div> |
| 38 |
|
|
| 39 |
|
<div class="contentdiv"> |
| 40 |
|
Content 3 Here. |
| 41 |
|
</div> |
| 42 |
|
|
| 43 |
|
</div> |
| 44 |
|
|
| 45 |
|
<div id="paginate-slider1" class="pagination"> |
| 46 |
|
|
| 47 |
|
</div> |
| 48 |
|
|
| 49 |
|
<script type="text/javascript"> |
| 50 |
|
|
| 51 |
|
featuredcontentslider.init({ |
| 52 |
|
id: "slider1", //id of main slider DIV |
| 53 |
|
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"] |
| 54 |
|
toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc] |
| 55 |
|
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide. |
| 56 |
|
revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover" |
| 57 |
|
enablefade: [true, 0.2], //[true/false, fadedegree] |
| 58 |
|
autorotate: [true, 3000], //[true/false, pausetime] |
| 59 |
|
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide |
| 60 |
|
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc) |
| 61 |
|
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc) |
| 62 |
|
} |
| 63 |
|
}) |
| 64 |
|
|
| 65 |
|
</script> |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
<br /> |
| 71 |
|
<h2>Example 2, Pagination links from markup</h2> |
| 72 |
|
|
| 73 |
|
<!--Inner content DIVs should always carry "contentdiv" CSS class--> |
| 74 |
|
<!--Pagination DIV should always carry "paginate-SLIDERID" CSS class--> |
| 75 |
|
|
| 76 |
|
<div id="slider2" class="sliderwrapper"> |
| 77 |
|
|
| 78 |
|
<div class="contentdiv"> |
| 79 |
|
Content 1 Here. |
| 80 |
|
</div> |
| 81 |
|
|
| 82 |
|
<div class="contentdiv"> |
| 83 |
|
Content 2 Here. <br /> |
| 84 |
|
<p></p><a href="javascript:featuredcontentslider.jumpTo('slider2', 1)">Go back to 1st slide</a></p> |
| 85 |
|
</div> |
| 86 |
|
|
| 87 |
|
<div class="contentdiv"> |
| 88 |
|
Content 3 Here. |
| 89 |
|
</div> |
| 90 |
|
|
| 91 |
|
</div> |
| 92 |
|
|
| 93 |
|
<div id="paginate-slider2" class="pagination"> |
| 94 |
|
|
| 95 |
|
<a href="#" class="toc">First Page</a> <a href="#" class="toc anotherclass">Second Page</a> <a href="#" class="toc">Third Page</a> <a href="#" class="prev" style="margin-left: 10px"><</a> <a href="#" class="next">></a> |
| 96 |
|
|
| 97 |
|
</div> |
| 98 |
|
|
| 99 |
|
<script type="text/javascript"> |
| 100 |
|
|
| 101 |
|
featuredcontentslider.init({ |
| 102 |
|
id: "slider2", //id of main slider DIV |
| 103 |
|
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"] |
| 104 |
|
toc: "markup", //Valid values: "#increment", "markup", ["label1", "label2", etc] |
| 105 |
|
nextprev: ["Previous", "Next"], //labels for "prev" and "next" links. Set to "" to hide. |
| 106 |
|
revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover" |
| 107 |
|
enablefade: [true, 0.2], //[true/false, fadedegree] |
| 108 |
|
autorotate: [false, 3000], //[true/false, pausetime] |
| 109 |
|
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide |
| 110 |
|
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc) |
| 111 |
|
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc) |
| 112 |
|
} |
| 113 |
|
}) |
| 114 |
|
|
| 115 |
|
</script> |
| 116 |
|
|
| 117 |
|
</BODY> |