Dit is mijn site. Mlein.nl
Ik ben geen programmeer wonder. En heb met een template voorelkaar gekregen dat die buttons openschuiven. Nu wil ik graag dat het weer sluit. Ik heb van alles geprobeerd maar het lukt mij niet. Ik zou diegene dankbaar zijn die mij kan helpen.
Volgens mij moet het in dit stukje code zitten.
[JS] allDivs.each(function(current) {
var iCurrent = current;
var sTitleID = elementid+"_msTitle_"+(iCurrent);
var sContentID = sTitleID+"_msContent_"+(iCurrent);
var currentDiv = allDivs[iCurrent];
var totalChild = currentDiv.childNodes.length;
var titleDiv = $(currentDiv).find("div.title");
titleDiv.attr("id", sTitleID);
var contentDiv = $(currentDiv).find("div.content");
contentDiv.attr("id", sContentID);
options.alldivs_array.push(sTitleID);
//$("#"+sTitleID).click(function(){openMe(sTitleID);});
$("#"+sTitleID).bind(options.event, function(){pause();openMe(sTitleID);})
});
//make vertical
if(options.vertical) {makeVertical();};
//open default
stopMe(elementid+"_msTitle_"+options.defaultid);
if(options.autodelay>0) {startPlay();};
//alert(allDivs.length);
function openMe(id) {
var sTitleID = id;
var iCurrent = sTitleID.split("_")[sTitleID.split("_").length-1];
options.currentcounter = iCurrent;
var sContentID = id+"_msContent_"+iCurrent;
if($("#"+sContentID).css("display")=="none") {
if(options.previousDiv!="") {
openMe(options.previousDiv);
};
if(options.vertical) {
$("#"+sContentID).slideDown("slow");
} else {
$("#"+sContentID).show("slow");
}
options.currentDiv = sContentID;
options.previousDiv = options.currentDiv;
};
};
function closeMe(id) {
var sTitleID = id;
var iCurrent = sTitleID.split("_")[sTitleID.split("_").length-1];
options.currentcounter = iCurrent;
var sContentID = id+"_msContent_"+iCurrent;
if($("#"+sContentID).css("display")=="none") {
if(options.previousDiv!="") {
closeMe(options.previousDiv);
};
if(options.vertical) {
$("#"+sContentID).slideDown("slow");
} else {
$("#"+sContentID).show("slow");
}
options.currentDiv = sContentID;
options.previousDiv = options.currentDiv;
};
};
function closeMe(div) {
if(options.vertical) {
$("#"+div).slideUp("slow");
} else {
$("#"+div).hide("slow");
};
}; [/JS]
Alvast heel erg bedankt.
Ik ben geen programmeer wonder. En heb met een template voorelkaar gekregen dat die buttons openschuiven. Nu wil ik graag dat het weer sluit. Ik heb van alles geprobeerd maar het lukt mij niet. Ik zou diegene dankbaar zijn die mij kan helpen.
Volgens mij moet het in dit stukje code zitten.
[JS] allDivs.each(function(current) {
var iCurrent = current;
var sTitleID = elementid+"_msTitle_"+(iCurrent);
var sContentID = sTitleID+"_msContent_"+(iCurrent);
var currentDiv = allDivs[iCurrent];
var totalChild = currentDiv.childNodes.length;
var titleDiv = $(currentDiv).find("div.title");
titleDiv.attr("id", sTitleID);
var contentDiv = $(currentDiv).find("div.content");
contentDiv.attr("id", sContentID);
options.alldivs_array.push(sTitleID);
//$("#"+sTitleID).click(function(){openMe(sTitleID);});
$("#"+sTitleID).bind(options.event, function(){pause();openMe(sTitleID);})
});
//make vertical
if(options.vertical) {makeVertical();};
//open default
stopMe(elementid+"_msTitle_"+options.defaultid);
if(options.autodelay>0) {startPlay();};
//alert(allDivs.length);
function openMe(id) {
var sTitleID = id;
var iCurrent = sTitleID.split("_")[sTitleID.split("_").length-1];
options.currentcounter = iCurrent;
var sContentID = id+"_msContent_"+iCurrent;
if($("#"+sContentID).css("display")=="none") {
if(options.previousDiv!="") {
openMe(options.previousDiv);
};
if(options.vertical) {
$("#"+sContentID).slideDown("slow");
} else {
$("#"+sContentID).show("slow");
}
options.currentDiv = sContentID;
options.previousDiv = options.currentDiv;
};
};
function closeMe(id) {
var sTitleID = id;
var iCurrent = sTitleID.split("_")[sTitleID.split("_").length-1];
options.currentcounter = iCurrent;
var sContentID = id+"_msContent_"+iCurrent;
if($("#"+sContentID).css("display")=="none") {
if(options.previousDiv!="") {
closeMe(options.previousDiv);
};
if(options.vertical) {
$("#"+sContentID).slideDown("slow");
} else {
$("#"+sContentID).show("slow");
}
options.currentDiv = sContentID;
options.previousDiv = options.currentDiv;
};
};
function closeMe(div) {
if(options.vertical) {
$("#"+div).slideUp("slow");
} else {
$("#"+div).hide("slow");
};
}; [/JS]
Alvast heel erg bedankt.