app/soc/content/js/menu-081108.js
changeset 2455 a023b71ce125
parent 449 a4dc4c9e7356
child 2800 cd9eed2b787e
equal deleted inserted replaced
2454:849956450d69 2455:a023b71ce125
     1 $(function() {
     1 $(function() {
     2   $('#side #menu li.expandable > a').dblclick(function() {
     2 
       
     3    var new_item_text = "(new)"
       
     4    $('#menu li.expandable').find('a').each(function(){
       
     5      if ($(this).text().indexOf(new_item_text) > -1)
       
     6      $(this).css('color', 'red');
       
     7    });
       
     8    
       
     9    $('#side #menu li.expandable > a').dblclick(function() {
     3     window.location = $(this).attr('href');
    10     window.location = $(this).attr('href');
     4   })
    11   })
     5   $('#side #menu li.expandable > span').toggle(function() {
    12   $('#side #menu li.expandable > span').toggle(function() {
     6     $(this).find("img").attr('src', '/soc/content/images/plus.gif').end().parent().children("ul").toggle();
    13     $(this).find("img").attr('src', '/soc/content/images/plus.gif')
       
    14     .end().parent().children("ul").toggle();
     7   }, function() {
    15   }, function() {
     8     $(this).find("img").attr('src', '/soc/content/images/minus.gif').end().parent().children("ul").toggle();
    16     $(this).find("img").attr('src', '/soc/content/images/minus.gif')
       
    17     .end().parent().children("ul").toggle();
     9     return false;
    18     return false;
    10   });
    19   });
    11   $('#side #menu li.expandable > span').contents().before('<img src="/soc/content/images/minus.gif" />');
    20   $('#side #menu li.expandable > span').contents()
       
    21   .before('<img src="/soc/content/images/minus.gif" />');
    12 });  
    22 });