~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlsearch/static/js/search.js

  • Committer: kaputtnik
  • Date: 2019-05-30 18:20:02 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: kaputtnik-20190530182002-g7l91m1xo28clghv
adjusted README; first commit on the new server

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Functions used for the search */
 
2
 
 
3
/* Show a jquery datepicker when clicking on an element with this class */
 
4
$( function() {
 
5
    $( ".datepicker" ).datepicker({
 
6
        dateFormat: "yy-mm-dd",
 
7
        showAnim: "slideDown",
 
8
        defaultDate: '-1y'
 
9
        });
 
10
  });
 
11
 
 
12
/* Hide elements which has this class */
 
13
/* TODO (Franku): Consider to use this also in wiki */
 
14
$( function() {
 
15
    $( ".closeable" ).click(function() {
 
16
      if ( $( this.nextElementSibling ).is( ":hidden" ) ) {
 
17
        $( this.nextElementSibling ).show( "slow");
 
18
      } else {
 
19
        $( this.nextElementSibling ).slideUp( "slow");
 
20
        }
 
21
    });
 
22
});