Thursday, March 16, 2017

Laravel: Refresh a div

First Laravel Project. How can I refresh a div on a page, where is a slideshow, too? I tried this, but not working:

var auto_refresh = setInterval(function () {
    $('.View').fadeOut('medium', function() {
        $(this).load('/echo/json/', function() {
            $(this).fadeIn('slow');
        });
    });
}, 2000);

The div, what I want to refresh:

<div class="left">
    <table border=1>
    <tr>
        <th>Barcode</th>
        <th>Name</th>
        <th>Count</th>
        <th>Netto price</th>
        <th>Brutto Price</th>
        <th>Summary</th>
    </tr>
@foreach ($summary as $summary)
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
@endforeach
<tr><td colspan=5>Summary:</td>
<?php $help = DB::select('select * from helper');
echo '<td>' . $help[0]->summ . '</td>';
?>
</tr>
</table>
</div>



via Feralheart

Advertisement