I'm having trouble trying to get a div to get content from another div on the first click.
Here is a bit of my code:
<a href="#" onClick="goPage1();">Feed</a>
And the function it's calling:
function goPage1(){
$("#feed").html("");
get_jsonp_feed();
$("#content").html($("#feedHTML").html());
}
What I'm trying to accomplish is clear the 'feed' div, then call an ajax function that retrieves some data from a database and puts it into the 'feed' div. After that, all the content within the 'feed' div is placed into the 'content' div.
If I don't clear the div in the first place, it displays the data after the second click, but keeps adding the 'feed' div with content that is already there.
Any ideas?