Fast. Du solltest $ gegen jQuery ersetzen.
Ich würde es so machen:
Code
function ah_custom_js() {
$returnValue =
'<script>
jQuery(document).ready(function () {
resize();
});
jQuery(window).resize(function () {
resize();
});
function resize() {
var wwidth = jQuery(window).width();
if (wwidth >= 800) {
jQuery("#jstable").attr("width", "750");
} else {
if (wwidth > 400) {
jQuery("#jstable").attr("width", Math.round(9 / 8 * wwidth - 150));
} else {
jQuery("#jstable").attr("width", "300");
}
}
}
</script>';
return $returnValue;
}
add_action('wp_head', 'ah_custom_js');
Alles anzeigen
Der Code kommt entweder in ein (eigenes) Plugin oder in die functions.php deines Child-Themes. In jedem Fall unbedingt ein Backup machen.