How to use variables as CSS arguments
I need to be able to pass a variable to a CSS argument after computing the size of the viewers window height. I am using an alert function to test it, but so far it won't populate.
- $(document).ready(function() {
- var winHeight = $(window).height();
- var winWidth = $(window).width();
- alert('The dimensions of the window are'+ winHeight + 'pixels high x ' + winWidth + ' pixels wide.');
- });
Any ideas why it's not working?