Bug 10444: Fix prevent the default action on click
[koha-ffzg.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-advsearch.tt
index eeed2eb..6d9ff8e 100644 (file)
 <script type="text/javascript" language="javascript">
     /* This function allows to display a new field to search.
     */
-    $(document).on("click", '.ButtonPlus', function() {
+    $(document).on("click", '.ButtonPlus', function(e) {
+        e.preventDefault();
         $('.ButtonLess').show();
         var thisLine = $(this).parent();
         var newLine = thisLine.clone();
         thisLine.after(newLine);
     });
 
-    $(document).on("click", '.ButtonLess', function() {
+    $(document).on("click", '.ButtonLess', function(e) {
+        e.preventDefault();
         if($(this).parent().siblings().length <= 3 ) {
            $('.ButtonLess').hide();
         }