Last change
on this file since 31966 was
31833,
checked in by lexming, 7 years ago
|
Initial commit
|
-
Property svn:executable set to
*
|
File size:
525 bytes
|
Line | |
---|
1 | (function () { |
---|
2 | var sbFunc = function(link, box) { |
---|
3 | $(link).click(function() { |
---|
4 | $(box).toggle(); |
---|
5 | ( $(box).is(":hidden") ) ? $(this).parent().removeClass( "switchOpen" ) : $(this).parent().addClass( "switchOpen" ); |
---|
6 | return false; |
---|
7 | }); |
---|
8 | $(box).on("mouseleave click", function() { |
---|
9 | $(this).hide(); |
---|
10 | $(this).parent().removeClass( "switchOpen" ); |
---|
11 | }); |
---|
12 | }; |
---|
13 | |
---|
14 | if (window.SwitchBox) { |
---|
15 | for (var i=0; i<SwitchBox.length; i+=2) |
---|
16 | sbFunc(SwitchBox[i], SwitchBox[i+1]); |
---|
17 | } |
---|
18 | |
---|
19 | window.SwitchBox = { |
---|
20 | push: sbFunc |
---|
21 | } |
---|
22 | })(); |
---|
Note: See
TracBrowser
for help on using the repository browser.