Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Remove old result - Ajax
#3

(This post was last modified: 04-08-2018, 01:12 AM by theedo.)

You can remove all elements inside the div using $("#category").empty(); . So when your PHP send data to ajax call, the first thing is
PHP Code:
$("#category").empty();. 


To show all categories you can do it maybe static. So you can do a foreach like that:

PHP Code:
<div class="row justify-content-center" id="category">
<?
php foreach($categories as $category): ?>
elements html etc etc
<?php endforeach; ?>
</div> 


This should work
Reply


Messages In This Thread
[SOLVED] Remove old result - Ajax - by googlemy - 04-08-2018, 01:00 AM
RE: Remove old result - Ajax - by jreklund - 04-08-2018, 01:10 AM
RE: Remove old result - Ajax - by theedo - 04-08-2018, 01:12 AM
RE: Remove old result - Ajax - by googlemy - 04-08-2018, 01:50 AM
RE: Remove old result - Ajax - by InsiteFX - 04-08-2018, 04:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB