Changing init value

Hi i have the following code



var number = 1;
var toggler = "p-select";;

function changeTogger() {
 toggler = toggler+number;
}

featuredcontentglider.init({
	gliderid: "canadaprovinces", //ID of main glider container
	contentclass: "glidecontent", //Shared CSS class name of each glider content
	togglerid: toggler, //ID of toggler container
	remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
	selected: 0, //Default selected content index (0=1st)
	persiststate: false, //Remember last content shown within browser session (true/false)?
	speed: 400, //Glide animation duration (in milliseconds)
	direction: "rightleft", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
	autorotate: false, //Auto rotate contents (true/false)?
	autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})

There is a toggler value that represents the id name - how can i get this to change, i’ve included a onclick function which changes the value of it but it’s not changing in the init function - how can i make this change…

Thanks in advance

Well, what does the init function look like? :wink:

toggler looks like it’s a global variable so in init you should be able to to just set it.


toggler = togglerid;