ajax content into dynamic loaded div
My more-news-holder is loaded dynamically, i think this is why when this code runs. my result does not go onto my page.
how can i fix this?
- <div id="more-news-holder"></div>
- <div class="more-news-container">
- <div id="more-news-btn" class="more-news" hreh="#">Get More News</div>
- </div>
Here is my jquery
- $("#more-news-btn").click(function(){
- $.ajax({url: "content/more-news.php?C=" + NewsCount, success: function(result){
- $("#more-news-holder").html(result);
- NewsCount = NewsCount + 30;
- }});
- });