diff --git a/mutalyzer/website/templates/homepage.html b/mutalyzer/website/templates/homepage.html index 264ca598e3b3e93e5fcec6d05e806a0618590b3e..f1d2bedfa6e8e4e8b786a8f9d90c8afc9a0bce98 100644 --- a/mutalyzer/website/templates/homepage.html +++ b/mutalyzer/website/templates/homepage.html @@ -126,11 +126,12 @@ This project is sponsored by <a href = "http://www.sun.com">SUN Microsystems</a> </p> <script> - $(".clickbox").click(function(){ + $(document).on('click', ".clickbox", function(e){ window.location=$(this).find("a").attr("href"); - return false; + e.preventDefault(); + e.stopPropagation(); }); - $(".clickbox input").click(function(e){ + $(document).on('click', ".clickbox input", function(e){ e.stopPropagation(); }); </script> diff --git a/mutalyzer/website/templates/static/js/interface.js b/mutalyzer/website/templates/static/js/interface.js index 88897ee4a3a591251089d30ec2b5057e170d5c7f..5d45e92df86493a480bb4f1c51a0f19f76c7d095 100644 --- a/mutalyzer/website/templates/static/js/interface.js +++ b/mutalyzer/website/templates/static/js/interface.js @@ -29,14 +29,15 @@ function clearField(form, fieldName) { } $(document).ready(function() { - $('.example-input').on('click', function() { + $(document).on('click', '.example-input', function(event) { var target = document.getElementById($(this).data('for')); $(target).val($(this).text()); - return false; + event.preventDefault(); + event.stopPropagation(); }); - $('.input-select').on('change', function() { + $(document).on('change', '.input-select', function(event) { var context = document.getElementById( $(this).data('context')).getElementsByClassName('subform'), target = document.getElementById($(this).data('for')), @@ -47,6 +48,7 @@ $(document).ready(function() { } target.style.display = ''; - return false; + event.preventDefault(); + event.stopPropagation(); }); });