1

hello i am taking the product name and images from database by ajax call and response data show on the div id "product_list" but product slide is not working properly,it is not listing all product image.my code is

<div class="carousel" id="product_list">
</div>
<script type="text/javascript">
   function get_product_list(queryString = false){
        var query = '';
        if(queryString){
            query = queryString;
        }else{
            query = {};
        }
        $.ajax({
                type: 'post',
                url: '<?php echo base_url();?>website/product_list',
                "data": query,
                success: function(data){
                    //alert(data);
                     //html = $.parseHTML(html);
                     //alert(html);
                     //var json = $.parseJSON(ParsedObject);
                    console.log(data);
                    $('#product_list').html(data);
                    $('#product_list').carousel({
                        dist:0,
                        shift:0,
                        //opacity:1,
                        padding:0,
                        //fullWidth: true,
                        numVisible:5, 
                        interval: 100
                    });

                },
                error: function(){
                    alert('Could not get Data from Database');
                }    
            });
        event.preventDefault();

    }
</script>

0 Answers0