Demo page for testing: http://jsfiddle.net/rCKzs/
<script type="text/javascript">
$(document).ready(function() {
alert( $("#test").width() );
});
</script>
..
<div id="test">content</div>
If I remove the jQuery Mobile, then it is okay, otherwise it return 0.
Do not use document.ready with jQM:
Also jQM only supports jQuery 1.6.4
I would use the live() like this