Team:Wageningen UR/JS/scripts.js

From 2013.igem.org

(Difference between revisions)
Line 24: Line 24:
$('#filters a').click(function () {
$('#filters a').click(function () {
     var ourClass = $(this).attr('class');
     var ourClass = $(this).attr('class');
-
     $('#container').children('div.' + ourClass).hide();
+
     $('#container').children('div.' + ourClass).hide('fast').removeClass('item');
-
     $('#container div.item').masonry();
+
     $('#container .item').masonry();
});
});

Revision as of 01:22, 29 July 2013

$=jQuery.noConflict();

$('h1.firstHeading, #contentSub').remove(); $('#topmenu .menucenter li .selflink').parent().addClass('active');

$(function ($) {

   jQuery(document).ready(function ($) {

$('.sub-project li:first-child a').prepend('<img src="Petri_dish.png">'); $('.sub-project li:nth-child(2) a').prepend('<img src="Aspergillus-icon.png">'); $('.sub-project li:nth-child(4) a').prepend('<img src="Atp-icon.png">'); $('.sub-project li:nth-child(5) a').prepend('<img src="Ph-icon.png">');

$('.sub-modeling li:nth-child(2) a').prepend('<img src="Database-icon.png">');

$('.sub-parts li:first-child a').prepend('<img src="Biobricks-icon.png">'); $('.sub-parts li:nth-child(2) a').prepend('<img src="Imprbiobricks-icon.png">');

$('.sub-human-practices li:nth-child(3) a').prepend('<img src="Conference-icon.png">'); $('.sub-human-practices li:nth-child(4) a').prepend('<img src="Collaborations-icon.png">');

$('.subs .extern').css({'background-image': 'none', 'padding-right': '0'});

$('#filters a').click(function () {

   var ourClass = $(this).attr('class');
   $('#container').children('div.' + ourClass).hide('fast').removeClass('item');
   $('#container .item').masonry();

});

$("#footer-box #footer:nth-child(2) ul").clone(true, true).contents().appendTo('#footer-box #footer:first-child ul'); $("#footer-box #footer:nth-child(2)").remove();

       $('#topmenu .project, ul.sub-project').hover(
           function() {
               $('ul.sub-project').toggleClass('active');
           }
       );
       $('#topmenu .modeling, ul.sub-modeling').hover(
           function() {
               $('ul.sub-modeling').toggleClass('active');
           }
       );
       $('#topmenu .parts, ul.sub-parts').hover(
           function() {
               $('ul.sub-parts').toggleClass('active');
           }
       );
       $('#topmenu .notebook, ul.sub-notebook').hover(
           function() {
               $('ul.sub-notebook').toggleClass('active');
           }
       );
       $('#topmenu .safety, ul.sub-safety').hover(
           function() {
               $('ul.sub-safety').toggleClass('active');
           }
       );
       $('#topmenu .team, ul.sub-team').hover(
           function() {
               $('ul.sub-team').toggleClass('active');
           }
       );
       $('#topmenu .menuright, ul.sub-human-practices').hover(
           function() {
               $('ul.sub-human-practices').toggleClass('active');
           }
       );
   });

});