Height of background image only resizes on refresh
I have a div with id #hero and I've set the height of #hero to change to
the window height with this jquery:
$(document).ready(function(){
$("#hero").height($(window).height());
$(window).resize(function(){
$("#hero").height($(window).height());
})
});
This works fine when I first load the page, when I refresh the page, or
when I resize the page. But when I navigate to the home page from another
page, #hero doesn't resize.
Any idea what could be causing this issue?
It may be worth mentioning that I'm using Rails 3.0, but I don't know what
that would have to do with it.
Thanks in advance!
No comments:
Post a Comment