I am using jQuery 1.4.2 to smoothly transition between similar web pages (in ff3). When you click on the link, the javascript script should load a new html, filter out the necessary elements and replace them on the current page.
It seems that $ (htmlcode) is not doing what I expected. The steps below work when loading the page directly, but when using $ .get I have the following problems:
- The search function seems only to look inside the div element called id = "page", which is located inside the body element
- one of the elements has
<script>...</script>but is <script>...</script>missing in the DOM in $ (htmlcode).
Does anyone know how to solve this?
$.get(
url,
function(responseText, textStatus, xmlHttpRequest) {
alert($(responseText).find("#header"));
alert($(responseText).find("#header").html());
alert($(responseText).find("title"));
}
);