$(document).ready(function() { $('#check').on('submit', function(e) { e.preventDefault(); $('#sub').prop('disable', true) $('#sub').text('Checking'); $.ajax({ url: '/home/checkorderstatus', method: 'POST', contentType: false, processData: false, cache: false, data: new FormData(this), success: function(data) { $('#success').slideDown('slow').html(data); } }); $(document).ajaxComplete(function() { $('#sub').prop('disabled', false) $('#sub').html('<i class="fa fa-search"></i>') $('#check').trigger("reset"); }) setTimeout(function() { $('#success').hide('slow') }, 3000) }) })
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter