Having trouble with a jQuery function: .css()
This is the HTML code in question:
<div class="..." id="about">
// OTHER HTML CODE
</div>
And here's the corresponding jQuery code:
(function($, window, document) {
$(function() {
var viewportHeight = $(window).height();
$('#about').css( "margin-top" , viewportHeight );
}(window.jQuery, window, document));
I've tried various combinations but can't seem to get it to work. I've experimented with different syntax for the .css() method and tried using other properties and methods like .click or .fadeOut() on the $('#about') object to no avail.
I'm working in an environment using Yeoman, Grunt & Angular.js. It's possible that Angular is causing interference with my function, although it seems odd since other functions like .click() are working fine (for example, I can use .addClass() on elements without issue).
Anyone familiar with this problem?