buddy adlı üyeden alıntı: mesajı görüntüle
teşekkür ederim.
Aslında ben aşağıdaki gibi birşey yaptım. menüm için class ismini değiştiriyorum. Ben buna ek olarak eğer pencere boyutu 800px den büyükse class ismini yatay 800pxden küçükse mobile olarak değiştir eklemek istemiştim. Yapılabilir mi ?

 function menudegistir() {

      var x = document.getElementById('menu');
      if (x.className === 'yatay') {
        x.className = 'mobile';
      } else {
        x.className = 'yatay';
      }
$(document).ready(function() {
  var w = window.innerWidth ||
    document.documentElement.clientWidth ||
    document.body.clientWidth;

  var h = window.innerHeight ||
    document.documentElement.clientHeight ||
    document.body.clientHeight;

  $("#width").text(w);
  $("#height").text(h);

  if (w > 800) {
    $("#menu").removeClass("mobile");
    $("#menu").addClass("yatay");
  } else {
    $("#menu").removeClass("yatay");
    $("#menu").addClass("mobile");
  }

  $(window).resize(function() {
    $("#width").text($(this).width());
    $("#height").text($(this).height());

    if ($(this).width() > 800) {
      $("#menu").removeClass("mobile");
      $("#menu").addClass("yatay");
    } else {
      $("#menu").removeClass("yatay");
      $("#menu").addClass("mobile");
    }

  });

});
Width: <span id="width"></span><br>
Height <span id="height"></span><br>
menu <span id="menu"></span>
buyur