Write a Comment

$('#form-review').on('submit', function (event) { event.preventDefault(); $.ajax({ url: '/ajax/comment.php', type: 'post', dataType: 'json', data: $('#form-review').serialize(), beforeSend: function () { // $('#button-review').button('loading'); }, complete: function () { // $('#button-review').button('reset'); }, success: function (json) { $('.alert-dismissible').remove(); if (json['error']) { $('#review').after('
' + json['error'] + '
'); } if (json['success']) { $('#review').after('
' + json['success'] + '
'); $('input[name=\'name\']').val(''); $('textarea[name=\'text\']').val(''); $('input[name=\'rating\']:checked').prop('checked', false); } } }); }); function myFunction() { $("#myInput").val(location.href); var copyText = document.getElementById("myInput"); copyText.select(); document.execCommand("copy"); $('.copytextdiv').text("Copied"); }