I have been struggling for a couple of weeks trying to solve this. Any help would be appreciated. I would like to use Jquery and Ajax to create a Div element to show the number of items that are in a customers basket. When the page loads I would like the Div to show "Your basket contains 0 items". As the user clicks the add button the data is sent to a PHP page to so that an item is added to the database. Then a row count is run on another page (which will then show the number of items in the basket). I can easily to get the code to run when breaking it down into individual parts, but when complied and added together the code does not refresh the Div the first time button is clicked. When clicked the second time it works fine. I have looked at Google Chromes developer tools and can see that the code is working as I would like and expect. I am hoping it is something simple but it is driving me mad. I have been struggling for a couple of weeks tr