please use –
$(window).width();
instead of $(window).width(function());
Update
see this – http://jsfiddle.net/ngGzX/3/
15
solved javascript getting width of browser and width of element
please use –
$(window).width();
instead of $(window).width(function());
see this – http://jsfiddle.net/ngGzX/3/
15
solved javascript getting width of browser and width of element