Team:Valencia UPV/javascript

From 2014.igem.org

(Difference between revisions)
Line 2: Line 2:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?action=raw&ctype=text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?action=raw&ctype=text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js?action=raw&ctype=text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js?action=raw&ctype=text/javascript"></script>
 +
 +
<script>
 +
jQuery(document).ready(function() {
 +
    jQuery('.tabs .tab-links a').on('click', function(e)  {
 +
        var currentAttrValue = jQuery(this).attr('href');
 +
 +
        // Show/Hide Tabs
 +
jQuery('.tabs ' + currentAttrValue).siblings().slideUp(400);
 +
jQuery('.tabs ' + currentAttrValue).delay(400).slideDown(400);
 +
 +
        // Change/remove current tab to active
 +
        jQuery(this).parent('li').addClass('active').siblings().removeClass('active');
 +
 +
        e.preventDefault();
 +
    });
 +
});
 +
</script>
<script type="text/javascript">
<script type="text/javascript">

Revision as of 18:32, 13 September 2014