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