Team:Shenzhen SFLS/comm/javascripts

From 2013hs.igem.org

(Difference between revisions)
Line 2: Line 2:
     var $menu_sub = $('<ul></ul>');
     var $menu_sub = $('<ul></ul>');
-
     var _menuItem = [{ 'txt': 'Home', 'link': 'https://2013hs.igem.org/Team:Shenzhen_SFLS/' }, { 'txt': 'Team', 'link': 'https://2013hs.igem.org/Team:Shenzhen_SFLS/Team/' }, { 'txt': 'Project', 'link': 'team.html' }
+
     var _menuItem = [{ 'txt': 'Home', 'link': 'https://2013hs.igem.org/Team:Shenzhen_SFLS/' }, { 'txt': 'Team', 'link': 'https://2013hs.igem.org/Team:Shenzhen_SFLS/Team/'}, { 'txt': 'Project', 'link': 'team.html' }
     , { 'txt': 'Notebook', 'link': 'team.html' }, { 'txt': 'Protocols', 'link': 'team.html' }, { 'txt': 'Human practices', 'link': 'team.html' }];
     , { 'txt': 'Notebook', 'link': 'team.html' }, { 'txt': 'Protocols', 'link': 'team.html' }, { 'txt': 'Human practices', 'link': 'team.html' }];

Revision as of 11:45, 13 June 2013

$(document).ready(function () {

var $menu_sub = $('
    ');
       var _menuItem = [{ 'txt': 'Home', 'link': 'https://2013hs.igem.org/Team:Shenzhen_SFLS/' }, { 'txt': 'Team', 'link': 'https://2013hs.igem.org/Team:Shenzhen_SFLS/Team/'}, { 'txt': 'Project', 'link': 'team.html' }
       , { 'txt': 'Notebook', 'link': 'team.html' }, { 'txt': 'Protocols', 'link': 'team.html' }, { 'txt': 'Human practices', 'link': 'team.html' }];
    
       for (var i = 0; i < _menuItem.length; i++) {
    
    $menu_sub.append('
  • <a href=' + _menuItem[i].link + '>' + _menuItem[i].txt + '</a></li>'); } $('.nav').append($menu_sub); $('.nav li').hover( function () { $(this).addClass('active'); }, function () { $('.nav li').removeClass('active'); }); });