I am a bad coder and am writing some shocking code that I build by googling until it worked.
My current bit of php is a twitter tool that uses jquery to load() in tweet threads on demand.
I've got the base code from the jquery .load() page
And looks like this
$("#clicks").click(function(){
$("#success").load("getTweet.php",{id:7245855505}, function(response, status, xhr ) {
if (status == "error") {
var msg = "Sorry but there was an error: ";
alert(msg + xhr.status + " " + xhr.statusText);
}
});
});
So my problem is, the above will have to be duplicated for each tweet that is a reply,
is there a way around the duplication as it will make the code look messy as with lumps of JS generated through out the page. Or is it ok to have a mess behind the scene if the user up front likes its function.