Hey there,
wondering if I could also for a bit of advice, I'm using a Javascript to scroll images on the homepage of a site i'm working on...
what I ideally want to do it have each image as a h ref linking to a page within the site.
If i try to assign this in the .js file it stops to scrolling function.
Does anyone know a way around this?
below is my javascript.... if anyone can help it'd be greatly appreciated.
var imgs = new Array(); var imgcnt = 0; var thisimg = 0;
imgs[imgcnt++] = 'images/tiarasindex.gif';
imgs[imgcnt++] = 'images/braceletsindex.gif';
imgs[imgcnt++] = 'images/earringsindex.gif';
imgs[imgcnt++] = 'images/necklaceindex.gif';
imgs[imgcnt++] = 'images/vintageindex.gif';
imgs[imgcnt++] = 'images/shoesindex.gif';
imgs[imgcnt++] = 'images/accessoriesindex.gif';
imgs[imgcnt++] = 'images/bridesmaidindex.gif';
function nextImg() {
if (document.images) {
thisimg++;
if (thisimg >= imgcnt) thisimg = 0;
document.rollimg.src = imgs[thisimg];
}
}
function prevImg() {
if (document.images) {
thisimg--;
if (thisimg < 0) thisimg = imgcnt-1;
document.rollimg.src = imgs[thisimg];
}
}
wondering if I could also for a bit of advice, I'm using a Javascript to scroll images on the homepage of a site i'm working on...
what I ideally want to do it have each image as a h ref linking to a page within the site.
If i try to assign this in the .js file it stops to scrolling function.
Does anyone know a way around this?
below is my javascript.... if anyone can help it'd be greatly appreciated.
var imgs = new Array(); var imgcnt = 0; var thisimg = 0;
imgs[imgcnt++] = 'images/tiarasindex.gif';
imgs[imgcnt++] = 'images/braceletsindex.gif';
imgs[imgcnt++] = 'images/earringsindex.gif';
imgs[imgcnt++] = 'images/necklaceindex.gif';
imgs[imgcnt++] = 'images/vintageindex.gif';
imgs[imgcnt++] = 'images/shoesindex.gif';
imgs[imgcnt++] = 'images/accessoriesindex.gif';
imgs[imgcnt++] = 'images/bridesmaidindex.gif';
function nextImg() {
if (document.images) {
thisimg++;
if (thisimg >= imgcnt) thisimg = 0;
document.rollimg.src = imgs[thisimg];
}
}
function prevImg() {
if (document.images) {
thisimg--;
if (thisimg < 0) thisimg = imgcnt-1;
document.rollimg.src = imgs[thisimg];
}
}