Hi,
How can I get the width of an image when the page is ready...?
I tried the code below, but it always return the value '0'...!
Code:
<script type="text/javascript" src="js/jquery/jquery-1.3.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var width = $("#image img").width();
alert(width);
});
</script>
PHP Code:
<div id="image">
<img src="xxx.jpg" />
</div>
many thanks,
Lau