change document.write into jquery
Hi
I'm trying to create widget, using jquery and php file.
firstly, i have html file with javascript link like this:
<script type="text/javascript" src="includefile.js"></script>
this script include javascript file with compressed jquery library and function, which include php file.
I'm using Ajax to include php file
$.get('myfile.php', {skintype: skin}, function(data){
$(this).html(data);
});
And now, my problem is, that this function doesn't response correctly beouse of this:
$(this).html(data);
How, i can use jquery, to inject html text in the place, there "<script type="text/javascript" src="includefile.js"></script>" script is, into the html file?
When i'm trying to use
document.write(data)
browser doesn't close ajax connection, html datas are displaing, but browser shows, that still loading this page....
when i'm using somthing like:
$("body").html(data);
it's ok, but i would like, to create script which is independend of the html structure, and the datas are displayed, where the main sctipt is.
Can you help me?