Browse Source

clicked class working now

master
Cristina Cochior 4 years ago
parent
commit
baf8d14ccf
  1. 66
      templates/layout.html

66
templates/layout.html

@ -310,40 +310,52 @@ $.ajax({
};
var methodList = getAllUrlParams().method;
alert(methodList);
var libList = getAllUrlParams().librarian;
alert(libList);
if (Array.isArray(libList)===false) {
var search_id0 = libList;
var element0 = document.getElementById(search_id0);
element0.classList.add("clicked");
// alert(search_id0);
if ( (typeof methodList === 'undefined') && (typeof libList === 'undefined')) {
} else {
for (i=0; i < libList.length ; i++) {
var search_id = libList[i];
var element = document.getElementById(search_id);
element.classList.add("clicked");
// alert(i);
};
if (Array.isArray(methodList)===false) {
var search_meth0 = methodList;
var elementy0 = document.getElementById(search_meth0);
elementy0.classList.add("methodclicked");
// alert(search_meth0);
} else {
for (y=0; y < methodList.length ; y++) {
var search_meth = methodList[y];
var elementy = document.getElementById(search_meth);
elementy.classList.add("methodclicked");
}
if (typeof libList !== 'undefined') {
if (Array.isArray(libList)===false) {
var search_id0 = libList;
var element0 = document.getElementById(search_id0);
element0.classList.add("clicked");
// alert(search_id0);
} else {
for (i=0; i < libList.length ; i++) {
var search_id = libList[i];
var element = document.getElementById(search_id);
element.classList.add("clicked");
// alert(i);
}
};
};
if (typeof methodList !== 'undefined') {
if (Array.isArray(methodList)===false) { // is not array
var search_meth0 = methodList;
var elementy0 = document.getElementById(search_meth0);
elementy0.classList.add("methodclicked");
} else { // is array
for (y=0; y < methodList.length ; y++) {
var search_meth = methodList[y];
var elementy = document.getElementById(search_meth);
elementy.classList.add("methodclicked");
}
};
};
};
});
});
</script>
</body>

Loading…
Cancel
Save