Hi, I modified the script in order to permit more instances in a page.
It is just 2 line of code with one more options to call.
I tried to wrote here the modification but the code is cut out.
Let me know how to submit the code
Hey pngised, you can add code here by surrounding it with the PRE or CODE tag. Please do post your suggestion, I'm sure others would benefit from it!
Hi Monji. Yes, I've tryed with CODE tag.
Now I try with PRE, hoping it is good. Thanks.
For multiple call in the same page, the "domready" call look like this:
$('#slider').sliderNav({n:1,height:420,arrows:false});
I introduced a new custom options called "n" (line 8 of js file):
var defaults = {items:..., n: null, debug...
Then after line 11 I define a new variable "num":
var num = (o.n) ? o.n : '';
and in line 12 I add the value of num in "alt" attributes:
for(var i in o.items) ... append(...
a alt='#"+o.items[i]+num+"'>
The HTML part need to have the same number in ID like the "n" custom option:
where it was
<li id="a">...became
<li id="an">...(where n is the custom option number).
Hope this is clear enough.
Cheers, Federico
It's pretty clear to me, if anyone has questions I'm sure they'll post a reply here though. Thanks again!
You must log in to post.
© Copyright 2010 DevGrow - Design. Develop. Grow. 20 queries. 0.34 seconds.