Difference between revisions of "Template:Team:Bielefeld-CeBiTec/JS"

(added 3 new links to story: applied design, measurement, labnotes generator)
(mobile detection test)
Line 180: Line 180:
 
$("#page-switch-next").attr("href", $story[$index + 1]);
 
$("#page-switch-next").attr("href", $story[$index + 1]);
 
}
 
}
 
//recolor contentboxes
 
/*$('.contentbox').each(function(i, obj) {
 
if ((i % 2) == 1) {
 
$(obj).css("background", "#f0f0f0");
 
} else if ((i % 2) == 0) {
 
$(obj).css("background", "#ffffff");
 
}
 
$content = $(obj).children(".content");
 
});*/
 
//recolor labnote contentboxes
 
/*$('.labnotebox').each(function(i, obj) {
 
if ((i % 2) == 1) {
 
$(obj).css("background", "#f0f0f0");
 
} else if ((i % 2) == 0) {
 
$(obj).css("background", "#ffffff");
 
}
 
$content = $(obj).children(".labnote-content");
 
});*/
 
 
 
 
hideNavbars();
 
hideNavbars();
Line 218: Line 199:
 
} else {
 
} else {
 
$("#page-arrow-top").css("display", "block");
 
$("#page-arrow-top").css("display", "block");
 +
}
 +
 +
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)) {
 +
$(".test").html("mobile");
 +
} else {
 +
$(".test").html("not mobile");
 
}
 
}
 
});
 
});

Revision as of 14:08, 28 October 2017