~widelands-dev/widelands-website/trunk

« back to all changes in this revision

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

  • Committer: kaputtnik
  • Date: 2019-02-09 14:41:20 UTC
  • mfrom: (515 widelands)
  • mto: This revision was merged to the branch mainline in revision 516.
  • Revision ID: kaputtnik-20190209144120-ex3xyztj9xs5qas8
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
        }
21
21
    });
22
22
});
23
 
 
24
 
/* Change the placeholder to show which section to search for */
25
 
$( function() {
26
 
      $("#selector").change(function() {
27
 
        input = $('#id_nav_search');
28
 
        /* Run the search if a search string is already given */
29
 
        if ( input[0].value !== "") {
30
 
          input[0].form.submit();
31
 
        }
32
 
        input.attr("placeholder", "Search "+this.value);
33
 
      });
34
 
});