you should use this code since you are using jQuery so that it can do its magic for browser compatibility:
$('#submit').click(function(){
var width = $(ddbar).width();
var height = $(ddbar).height();
alert(width);
alert(height);
});
Of course, jQuery approach will be slower: http://jsperf.com/jq-width-vs-client-width
solved How to calculate width and height of element in JQuery [closed]