Project

General

Profile

Feature #3033 » chamilo_1896_4e7d4ffb43d8.patch

Laurent Opprecht, 07/03/2011 16:46

View differences:

common/libraries/resources/javascript/collapse_horizontal.js
2 2
$(document).ready(function()
3 3
{
4 4
    //$('.collapsed .row').hide();
5
    $('div.collapsible').bind('click', me_toggle);
5
    $('div.collapsible .category a').bind('click', me_toggle);
6 6

  
7 7
    function me_toggle()
8 8
    {
9
        $('.collapsible .row').toggle();
9
        var div = $(this).parent().parent();
10
        div.find('.collapsible .row').toggle();
10 11

  
11
        if($(this).is('.collapsed')){
12
            $(this).removeClass('collapsed');
13
            $(this).addClass('expanded');
12
        if(div.is('.collapsed')){
13
            div.removeClass('collapsed');
14
            div.addClass('expanded');
14 15
        }else{
15
            $(this).addClass('collapsed');
16
            $(this).removeClass('expanded');
16
            div.addClass('collapsed');
17
            div.removeClass('expanded');
17 18
        }
18 19

  
19 20
        return false;
(3-3/3)