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

m (pages begin now with white contentbox)
(added code for new page switch butons)
Line 1: Line 1:
 
<html>
 
<html>
 
<script>
 
<script>
 
 
  
 
$(document).ready(function() {
 
$(document).ready(function() {
Line 167: Line 165:
 
if ($index == 0) {
 
if ($index == 0) {
 
$("#page-switch-prev-li").hide();
 
$("#page-switch-prev-li").hide();
 +
$("#footer-left").html("<p></p>");
 
} else {
 
} else {
 
$("#page-switch-prev").attr("href", $story[$index - 1]);
 
$("#page-switch-prev").attr("href", $story[$index - 1]);
Line 530: Line 529:
 
});
 
});
  
 +
$(document).ready(function() {
 +
    $(".page-switch.prev").mouseover(function() {
 +
$hoverItem = $(this);
 +
$hoverItem.attr("src", "https://static.igem.org/mediawiki/2017/c/cd/T--Bielefeld-CeBiTec--page-arrow-previous-white.svg");
 +
    });
 +
$(".page-switch.next").mouseover(function() {
 +
$hoverItem = $(this);
 +
$hoverItem.attr("src", "https://static.igem.org/mediawiki/2017/4/45/T--Bielefeld-CeBiTec--page-arrow-next-white.svg");
 +
    });
 +
});
 +
 +
$(document).ready(function() {
 +
    $(".page-switch.prev").mouseout(function() {
 +
$hoverItem = $(this);
 +
$hoverItem.attr("src", "https://static.igem.org/mediawiki/2017/4/44/T--Bielefeld-CeBiTec--page-arrow-previous.svg");
 +
    });
 +
$(".page-switch.next").mouseout(function() {
 +
$hoverItem = $(this);
 +
$hoverItem.attr("src", "https://static.igem.org/mediawiki/2017/c/c8/T--Bielefeld-CeBiTec--page-arrow-next.svg");
 +
    });
 +
});
  
  
 
</script>
 
</script>
 
</html>
 
</html>

Revision as of 06:55, 10 October 2017