Subversion Repositories My Stuff

Rev

Rev 13 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13 kardasa 1
/*#######################################################################
3 kardasa 2
# This script is distributed in the hope that it will be useful,
3
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5
# GNU General Public License for more details.
6
# Author: Andrzej Kardaś
7
# License: GPLv3
8
# The full version of the licencse can be obtainted by visiting:
9
# http://www.gnu.org/licenses/gpl.html
13 kardasa 10
#######################################################################*/
3 kardasa 11
$(document).ready(function(){
15 kardasa 12
      $('.toggle').each(function(){
3 kardasa 13
              var $link = $(this).children('a.toggle_link:first');
15 kardasa 14
              var $content = $(this).children('.toggle_content:first');
3 kardasa 15
              $link.click(function(){
16
                   if ($link.is('.toggle_close')){
17
                        $link.removeClass('toggle_close');
18
                        $link.addClass('toggle_open');
19
                   } else if ($link.is('.toggle_open')){
20
                        $link.removeClass('toggle_open');
21
                        $link.addClass('toggle_close');
22
                   }
23
                   $content.slideToggle("slow");
24
                   return false;
25
              });
26
      });
27
});