PageSourceSearch

https://www.funenbulle.ch/data/web/funenbulle2019.ch/templates/js/prepareAccordion.js

js funenbulle.ch collected 2026-09-28 15:04:34 UTC 2,252 bytes, 101 lines download raw bytes

1$(document).ready(function() {
2	$(document).ready(function(){
3		
4		$('.accordion').prepareAccordion();
5	
6	})
7	
8	/*$.fn.prepareAccordion = function(){
9		
10		var accordion = this;
11		
12		accordion.find('.object').each(function(i,e){
13			$(e).closeTopic();
14		})
15		
16		accordion.find('.object h2').unbind().bind('click', function(e){
17			var topic = $(this).parents('.object');
18			if(topic.hasClass('closed')){
19				topic.openTopic();
20			}
21			if(topic.hasClass('open')){
22				topic.closeTopic();
23			}
24		})
25	}*/
26	
27	$.fn.prepareAccordion = function(){
28		
29		var accordion = this;
30		
31		$('.object').children('div').addClass('content');
32		
33		accordion.find('.object h2').unbind().bind('click', function(e){
34			var topic = $(this).parents('.object');
35			if(topic.hasClass('open')){
36				topic.closeTopic();
37			}
38			else{
39				topic.openTopic();
40			}
41		});
42		if (!$('body').hasClass('admin')) {
43			accordion.find('.object div.content').hide();
44		}
45		if(window.location.hash) {
46		  var anchorvalue = window.location.hash;
47		  var anchorelement = $(anchorvalue); //returns a HTML DOM Object
48		  if (anchorelement.hasClass('hasaccordion')){
49		  	anchorelement.openTopic();
50		  }
51		} 
52	}
53	
54	/*$.fn.closeTopic = function(){
55	
56		var topic = this;
57		
58		topic.find('div').eq(0).stop().animate({
59			//'height':0
60		}, 500, function(){
61			topic.addClass('closed').removeClass('open')
62		})
63	
64	}*/
65	
66	$.fn.openTopic = function(){
67		var topic = this;
68		topic.siblings('div.open').removeClass('open').find('div.content').slideUp();
69		topic.children('div.content').slideDown();
70		topic.addClass('open');
71	}
72	
73	$.fn.closeTopic = function(){
74		var topic = this;
75		topic.children('div.content').slideUp();
76		topic.removeClass('open');
77	
78	}
79	
80	/*$.fn.openTopic = function(){
81		
82		var topic = this;
83		var innerHeight = 10;
84		
85		var accordion = topic.parents('.accordion');
86		accordion.find('.object').each(function(i,e){
87			$(e).closeTopic();
88		})
89		topic.find('div').eq(0).each(function(i,e){
90			innerHeight += $(e).outerHeight();
91		})
92		
93		topic.find('div').eq(0).css({'background-color' : '#e388b9'});
94		topic.find('div').eq(0).stop().animate({
95			'height': innerHeight+'px', 'background-color': '#F3F3F1'
96		}, 500, function(){
97			topic.addClass('open').removeClass('closed')
98		})
99	
100	}*/
101});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.