Uncaught exception: Error: Syntax error, unrecognized expression:
Using the following jQuery (a lot of manipulating here, because I can only
do this in the body tag):
<script type="text/javascript">
if(!window.jQuery)
{
var script = document.createElement("script");
script.type = "text/javascript";
script.async = false;
script.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
var oScripts = document.getElementsByTagName("script");
var s = oScripts[0];
s.parentNode.insertBefore(script, s);
}
function wrapForum() {
jQuery(document).ready(function($) {
var $smf_content = $("#smf_col").html();
$("#smf_col").empty();
var $dptable = $(".dp_main").html();
var $dpPrev = $(".dp_main").prev();
$(".dp_main").remove();
$($smf_content).insertAfter($dpPrev);
var $body = $("body").html();
$("body").html($dp_table);
$("#smf_col").html($body);
});
}
addLoadEvent(wrapForum);
The page is here: http://devs.dream-portal.net/smf205/index.php?action=forum
I am trying to take the contents of the $dp_table after removing stuff
from it and appending what was removed to the body tag, and than remove
the entire html within the body tag and insert it into the same place
where some html was originally removed and than add it all to the body
tag.
What am I doing wrong here? Do I need to escape html? I never had a
problem doing this before with jQuery...
No comments:
Post a Comment