I'm trying to create a "scrolling pagination" (similar to Facebook) except users have to click to load more content.
This is my javascript function. I'm using Jquery.
The php file gets queries from the database and formats the information based on what type of content it is. The php file works without the ajax call.Code:function GetMore(){ $.ajax({ url: 'phpfile_that_echos_content.php', success: function(data){ $('#content').append(data); } }); }
I call it using a clickable image...
However, when I click the image, it does not show. When I append data to the content div without using $.ajax, it works. My site is hosted on Godaddy with a Linux server and I'm using PHP. Does anyone know why my code isn't working?Code:<a href="javascript: GetMore()"> <img src="image.png" /> </a>



Reply With Quote

Bookmarks