You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

console.log('scripts loaded');
document.onreadystatechange = function(event) {
if (document.readyState === "complete") {
console.log('document loaded');
document.addEventListener("click",function (event) {
console.log(event.target);
curpos=1;
if(document.getElementById("top-slider").getAttribute("data-position"))
{
curpos = document.getElementById("top-slider").getAttribute("data-position");
}
nextposition = get_next_pos(curpos);
prevposition = get_prev_pos(curpos);
/*
if(event.target.matches('.prev'))
{
document.getElementById("slider").setAttribute("data-position",$prevposition);
}
if(event.target.matches('.pause'))
{
document.getElementById("slider").setAttribute("data-paused","true");
}
if(event.target.matches('.next'))
{
document.getElementById("slider").setAttribute("data-position",$nextposition);
}
*/
});
}
}
function get_next_pos()
{
}
function get_prev_pos()
{
}