I'm trying to just get started doing some very basic stuff with
Phonegap using XUI, and the simple act of adding a div isn't working
for me. It's entirely possible that I'm missing something obvious,
but I've distilled this down to a very basic page, and it's still not
working (either as a page or within a Phonegap app). I've been using
the 5.0 emulator to do this work, and I get "The page you requested
could not be loaded; it is too large for the device" whenever I try
and add a div to the document. The same code works fine within
Firefox. This is also true of the XUI tests which try to perform the
same task. The page I'm trying to use is below. Is there something
totally obvious I'm missing here? Thanks.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title>XUI problem</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0,
maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="javascript/xui_bb_2.0.0.js" type="text/javascript"></
script>
<script type="text/javascript">
x$(window).load(function(e){
x$('#button-add').click(function(){
x$('#header').html('before','<div id="new-div">Hello!</div>');
});
///---
});
</script>
</head>
<body>
<div id="header">
<h1>A header</h1>
<button id="button-add">Click me</button>
</div><!-- /header -->
</body>
</html>