Its been a long day and I've learnt much about js but my heads fuzzled on this one, ok so I need to get one of the array numbers (depending on the one the user clicks into the settings below. but i have no idea how, ive tried reading up on arrays but i cant get my head around it. :/
Sorry, I need to call a function every time I click on a different link and i need the functions to repond to each div seperatly.
var navLink = new Array();
navLink[0] ='#one' < this is the Id of an href link.
navLink[1] ='#two'
navLink[2] ='#three'
navLink[3] ='#four'
navLink[4] ='#five'
navLink[5] ='#six'
var navDiv = new Array();
navDiv[0] ='#content-one' < this is the Id of a content div.
navDiv[1] ='#content-two'
navDiv[2] ='#content-three'
navDiv[3] ='#content-four'
navDiv[4] ='#content-five'
navDiv[5] ='#content-six'
var settings = {
objSlideTrigger: navLink[x], // link button id
objSlidePanel: navDiv[x] // slide div class or id
}
I hope i have explained myself well enough... sorry if i havent.
I know this works but it only works for one...
var settings = {
objSlideTrigger: '#one', // link button id
objSlidePanel: '#content-one' // slide div class or id
}
Heres a js fiddle that shows the core element of what im trying to achieve. Howeve this is just a single link and content box, i want multiple links and content boxes. that all respond individually to being selected. jsfiddle.net/BeU3U/6/
x?indexof the element on which the user clicked?