Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Need to add padding to top of headers Re: Need to add padding to top of headers

#120605
DesignLady94
Member

Looks like this is resolved, thanks to an answer posted here:
http://stackoverflow.com/questions/7306933/how-to-detect-window-size-and-then-do-something-with-jquery-switch-statement.

Thanks so much for your help!

$(document).ready(function() {
var width = $(window).width();
if (width > 979 ) {
$(‘.nav li a’).click(function() {
$(‘h1, h2’).addClass(‘toppad’);
});
}
});