source: branches/version-2_12-dev/html/user_data/packages/sphone/js/category.js @ 22605

Revision 22605, 968 bytes checked in by pineray, 11 years ago (diff)

#2166 typo

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
Line 
1/*------------------------------------------
2初期化
3------------------------------------------*/
4//level?クラスを持つノード全てを走査し初期化
5$(function(){
6    $("#categorytree li").each(function(){
7        if ($(this).children("ul").length) {
8            //▶を表示し、リストオープンイベントを追加
9            var tgt = $(this).children('span.category_header');
10            var linkObj = $("<a>");
11            linkObj.text('+');
12            tgt
13                .click(function(){
14                    $(this).siblings("ul").toggle('fast', function(){
15                        if ($(this).css('display') === 'none') {
16                            tgt.children('a').text('+');
17                        } else {
18                            tgt.children('a').text('-');
19                        }
20                    });
21                })
22                .addClass('plus')
23                .append(linkObj);
24        }
25    });
26});
Note: See TracBrowser for help on using the repository browser.