diff --git a/html/assets/js/calcscript.js b/html/assets/js/calcscript.js index 05dc414..422d99a 100644 --- a/html/assets/js/calcscript.js +++ b/html/assets/js/calcscript.js @@ -1,35 +1,12 @@ $(document).ready(function() { - $('.select_programme').change(function() { - var myText = $(".select_programme option:selected").text(); - var options = 'IG<\/option>G<\/option>VG<\/option>MVG<\/option><\/select>'; - $('.courses').html('') - $.each(json[myText], function(i, object) { - var row = null; - $.each(object, function(property, value) { - if (property == 'Subject') { - row = ''; - //$('.courses').append(''); - } else { - row = row + ''; - row = row + options; - row = row + 'Ta bort rad<\/a><\/div>'; - //$('.courses').append(''); - //$('.courses').append(options); - $('.courses').append(row); - } - }); - }); - $('.courses').append(''); - $('.courses').append(''); - }); $('form').change(function() { raknaUtMeritvarde(); }); - $('.add_row').on('click', function() { + $('.add_row').live('click', function() { $('div.sample_row > div').clone().appendTo('form.courses'); raknaUtMeritvarde(); }); - $('.delete_row').on('click', function() { + $('.delete_row').live('click', function() { $(this).parent().slideUp(function() { $(this).remove(); raknaUtMeritvarde(); diff --git a/html/include/html_script_bottom_head.php b/html/include/html_script_bottom_head.php index e397029..951ec24 100644 --- a/html/include/html_script_bottom_head.php +++ b/html/include/html_script_bottom_head.php @@ -2,7 +2,7 @@ echo "