PDA

View Full Version : Featured Content Slider Invisible



ETpro
08-25-2013, 09:47 PM
1) Script Title: Featured Content Slider v2.5

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

3) Describe problem: Website: http://www.acesewvactest.com/index.html

The slide show seems to be installed properly. I have it running on numerous other sites on the Yahoo! Store platform. I've checked to ensure that the script isn't corrupt and is loading. But visibility of the slides is not getting toggled. It always remains "visibility: hidden;". To see the HTML for the slideshow in Chrome or Firefox ? Firebug, right click in the big white space below the header and click to inspect.

I've stared at this till my eyes are crossed. Can anyone see why the slider script is not running?

Thanks

Jim Hollomon

jscheuer1
08-26-2013, 01:21 AM
The value of toc: in the init has one extra " mark in it (highlighted and red in the below), replace:


<script type="text/javascript">
featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: ["", "Handi", "Quilter", "Sweet", "16", "-", "TruStitch", "full", "color", "visibility", "stitch-regulation-", "Top", "Seller.", "As", "Low", "as", "$100", "a", "month."", "Janome's MB-4 four needle embroidery machine. World's first multi-needle embroidery machine for home use. Sew like a pro. On sale now!", "Juki 2200 QVP - 18 inches of horizontal throat space New! Long Arm Machine by Juki. Lowest price guarantee.", "Singer 160 computerized sewing machine. Timeless design plus state-of-the-art features. On sale now!", "Handi Quilter Avante - perfect for quilts ranging from crib size to king size - hand-crafted in the USA. As Low as $100 a month.", "Viking Designer Diamond - features the largest embroidery area in the industry - sew and quilt. Lowest price guarantee."], //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["", ""], //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.05], //[true/false, fadedegree]
autorotate: [true, 6000], //[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>

with:


<script type="text/javascript">
featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: ["", "Handi", "Quilter", "Sweet", "16", "-", "TruStitch", "full", "color", "visibility", "stitch-regulation-", "Top", "Seller.", "As", "Low", "as", "$100", "a", "month.", "Janome's MB-4 four needle embroidery machine. World's first multi-needle embroidery machine for home use. Sew like a pro. On sale now!", "Juki 2200 QVP - 18 inches of horizontal throat space New! Long Arm Machine by Juki. Lowest price guarantee.", "Singer 160 computerized sewing machine. Timeless design plus state-of-the-art features. On sale now!", "Handi Quilter Avante - perfect for quilts ranging from crib size to king size - hand-crafted in the USA. As Low as $100 a month.", "Viking Designer Diamond - features the largest embroidery area in the industry - sew and quilt. Lowest price guarantee."], //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["", ""], //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.05], //[true/false, fadedegree]
autorotate: [true, 6000], //[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>



The browser cache may need to be cleared and/or the page refreshed to see changes.

Oh, and I'm not sure why you need such a complex toc. I'm not saying that you don't, but if you don't it would be less error prone if it were simpler.

ETpro
08-27-2013, 12:51 AM
Aha. That's a spurious quotation mark in the content being pulled in from the site's database. That script is written dynamically, so it looks like I need to sweep the strings it's pulling in for anything that would interfere with JavaScript parsing. Thanks John, for a good set of eyes.

Fixing that did the trick.

jscheuer1
08-27-2013, 01:32 AM
I was looking at it a bit closer and the toc for that page is display: none;, so it's not being used. That being the case, one could use:


toc: '#increment',

Which will generate (unseen) toc links of 1, 2, 3, etc.

If you keep the current setup and the toc is seen it would look strange, with there being no link for the first image ("") and the subsequent links of:


"Handi", "Quilter", "Sweet", "16", "-"

for the remaining images. Since that's all that there are, all of the rest of the current toc array would be ignored for the slider on this page.

Again, regardless of what's used, since they're display none;, they will not be seen. And since it's javascript, will not help/hurt SEO.

Obviously, using '#increment' will avoid the error you're getting from the database.