Created
January 8, 2019 14:35
-
-
Save rodrigophpweb/cd5912ba638602cfe1455052e5bfd367 to your computer and use it in GitHub Desktop.
Script chamar ajax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
jQuery(document).ready(function() { | |
jQuery('.selecionar').change(function() { | |
if ($(this).prop('checked')) { | |
var selecionar = $('.selecionar'); | |
jQuery.ajax({ | |
url:selecionar.attr('action'), | |
data:selecionar.serialize(), | |
type:selecionar.attr('method'), | |
beforeSend:function(xhr){ | |
selecionar.find('.selecionar').text('Processing....'); | |
}, | |
sucess:function(data){ | |
$('#response').html(data); | |
} | |
}); | |
return false; | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment