source: main/trunk/greenstone3/web/interfaces/therin/js/custom.js@ 28644

Last change on this file since 28644 was 28644, checked in by jlwhisler, 10 years ago

A new interface created using a CSS template by luiszuno.com. Based on the default interface.

File size: 3.3 KB
Line 
1// Jquery with no conflict
2jQuery(document).ready(function($) {
3
4
5
6 //##########################################
7 // Widgets
8 //##########################################
9
10 var container = $(".widget-cols");
11 var trigger = $("#widget-trigger");
12
13 trigger.click(function(){
14 container.animate({
15 height: 'toggle'
16 }, 500
17 );
18
19 if( trigger.hasClass('tab-closed')){
20 trigger.removeClass('tab-closed');
21 }else{
22 trigger.addClass('tab-closed');
23 }
24
25 return false;
26
27 });
28
29 //##########################################
30 // Tool tips
31 //##########################################
32
33
34 $('.poshytip').poshytip({
35 className: 'tip-yellowsimple',
36 showTimeout: 1,
37 alignTo: 'target',
38 alignX: 'center',
39 offsetY: 5,
40 allowTipHover: false
41 });
42
43 //##########################################
44 // Superfish
45 //##########################################
46
47 $(".sf-menu").superfish({
48 animation: {height:'show'}, // slide-down effect without fade-in
49 delay: 800 , // 1.2 second delay on mouseout
50 autoArrows: false,
51 speed: 100
52 });
53
54
55 //##########################################
56 // Slider
57 //##########################################
58
59 $('#slider').nivoSlider({
60 effect: 'random', // Specify sets like: 'fold,fade,sliceDown'
61 animSpeed: 500, // Slide transition speed
62 pauseTime: 3000, // How long each slide will show
63 startSlide: 0, // Set starting Slide (0 index)
64 controlNav: true // 1,2,3... navigation
65 });
66
67
68
69
70
71
72
73 //##########################################
74 // Accordion box
75 //##########################################
76
77 $('.accordion-container').hide();
78 $('.accordion-trigger:first').addClass('active').next().show();
79 $('.accordion-trigger').click(function(){
80 if( $(this).next().is(':hidden') ) {
81 $('.accordion-trigger').removeClass('active').next().slideUp();
82 $(this).toggleClass('active').next().slideDown();
83 }
84 return false;
85 });
86
87 //##########################################
88 // Toggle box
89 //##########################################
90
91 $('.toggle-trigger').click(function() {
92 $(this).next().toggle('slow');
93 $(this).toggleClass("active");
94 return false;
95 }).next().hide();
96
97 //##########################################
98 // Tabs
99 //##########################################
100
101 $(".tabs").tabs("div.panes > div", {
102 // remove effect to prvent issues on ie
103 });
104
105
106
107 //##########################################
108 // Create Combo Navi
109 //##########################################
110
111 // Create the dropdown base
112 $("<select id='comboNav' />").appendTo("#combo-holder");
113
114 // Create default option "Go to..."
115 $("<option />", {
116 "selected": "selected",
117 "value" : "",
118 "text" : "Navigation"
119 }).appendTo("#combo-holder select");
120
121 // Populate dropdown with menu items
122 $("#nav a").each(function() {
123 var el = $(this);
124 var label = $(this).parent().parent().attr('id');
125 var sub = (label == 'nav') ? '' : '- ';
126
127 $("<option />", {
128 "value" : el.attr("href"),
129 "text" : sub + el.text()
130 }).appendTo("#combo-holder select");
131 });
132
133
134 //##########################################
135 // Combo Navigation action
136 //##########################################
137
138 $("#comboNav").change(function() {
139 location = this.options[this.selectedIndex].value;
140 });
141
142});
Note: See TracBrowser for help on using the repository browser.