mardi 24 avril 2018

what's wrong with this if/else in js [on hold]

I am not sure why this code does not work? I am missing something most likely. Can you help? I've tried putting it into a

$(document).ready(function(){


});

But no success.

if (screen.width < 942 && window.location.href.indexOf("sections") > -1) {
  $('.footer').css({
    'position': 'absolute',
    'width': '100%',
    'bottom': '0px'
  });
} else (screen.width > 942 && window.location.href.indexOf("sections") > -1) {

  $('.footer').css({
    'position': 'relative',
    'width': '100%',
    'bottom': '0px'
  });
}

Aucun commentaire:

Enregistrer un commentaire