Team:DTU-Denmark/sysucolortest

From 2014.igem.org

(Difference between revisions)
Line 11: Line 11:
$(document).ready(function(){
$(document).ready(function(){
-
$('.scrollable').click(function() {
+
    $('.scrollable').each(function() {
-
     $('body').animate({
+
        var target = $(this).attr("href").match(/#(.)+$/);
-
        scrollTop: eval($('#' + $(this).attr('target')).offset().top-30)
+
        alert(target);
-
    }, 800);
+
    }
-
});  
+
   
 +
   
 +
     $('.scrollable').click(function() {
 +
        $('body').animate({
 +
            scrollTop: eval($('#' + $(this).attr('target')).offset().top-30)
 +
        }, 800);
 +
    });  
});
});

Revision as of 09:33, 17 October 2014

MOVED to template_css