Click here to Skip to main content
15,899,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have append the ajax coding,data are coming fine,here during appending this style="position: absolute; left: 468px; top: 0px;" css is not adding to my new appende data.how can i do this.Below is my ajax code.plz suggest me.Thanxx in advance.


XML
<?php
 $per_page=20;
   $latestImages = mysql_query("select * from ".GIFIMAGES." WHERE isActive = '1' AND not_update='1'   order by modified ");
  $total_record=mysql_num_rows($latestImages)/5;
$maxPage=number_format((float) $total_record, 2, '.', '');

 ?>
<script>
    var lastX = 0;
            var currentX = 0;
            var page = 1;
            function loadMore() {
            if (page < '<?php echo $maxPage;?>') {
            page++;
            $('#load-more').html('Loading...');
              $.post("ajax_append.php", {'ajax_append':'<?php echo $per_page;?>','page':page},function(data)
         {
                 alert(data);

               $('#homeload').append(data);

                $('#load-more').html('VIEW MORE');
            });
            } else {
            $('#load-more').hide();
            }
            }



</script>
Posted

1 solution

Because other CSS might be ruling it out. So what you can do is, use !important.
CSS
{
    position: absolute !important; 
    left: 468px !important; 
    top: 0px !important; 
}

Let me know, if it works :)


-KR
 
Share this answer
 
Comments
Sradhanjali Behera 12-Oct-15 8:00am    
But here this is not an inline css.Through js css is adding to that div ,how can i manage it through inline? plz explain.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900