I have the following code proceso.js
(function ($) {
$.fn.Carpeta = function (options) {
var defaults = {
codigoI: false,
};
this.each(function () {
var crear = $(this);
if (options.input) {
$(createInput).find('.confirm').click(function () {
if ($(createInput).find('input').val() === '')
return;
//Aqui es donde tengo la variable que captura el dato y lo imprime por pantalla
var input= $(createInput).find('input').val();
});
};
})(jQuery);
index.php
@extends('templade')
@section('content')
<p align="right"><?php echo date('l j \of F Y H:i:s');?></p>
<script src="js/proceso.js"></script>
<div class="col-md-11">
<div class="carpeta" id="carp">
<ul>
<li> </li>
</ul>
</div>
</div>
<script>
(function ($) {
function init() {
$('.carpeta').Carpeta({
codigoI: true,
});
}
window.onload = init();
})(jQuery)
</script>
@endsection
Now my question is how can I send from jquery the contents of that variable 'input' to my php document and then store it in the database?