summaryrefslogtreecommitdiffstats
path: root/public/media/js/user.js
blob: 488ab45c2bd8b47473288d30826d824a2da94f2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$(document).ready(function(){
	if($('.listelement .element').find('.dispnone').length >= 1){
		$(this).find('.title').css('cursor','pointer');
		$(this).find('.title').prepend("<span class='toggler'><img src='/media/img/right.png'></span> ");
		$(this).find('.title').data('toggle','0');
		
		$('.listelement .title').click(function(){
			$(this).siblings('.dispnone').toggle();
			if($(this).data('toggle') == '0'){
				$(this).data('toggle','1');
				$(this).find('.toggler img').attr('src','/media/img/down.png')
			}
			else{
				$(this).data('toggle','0');
				$(this).find('.toggler img').attr('src','/media/img/right.png')
			}
		});
	}
});