'일/Jquery'에 해당되는 글 2건

  1. 2016.06.28 팝업창 리사이즈
  2. 2010.01.28 serialize()

팝업창 리사이즈

일/Jquery 2016. 6. 28. 10:34

 


최종 적으로 브라우저의 outerWidth / outerHeight 지원 여부를 확인하면 모든 브라우저에서
팝업창의 크기를 변경할 수 있습니다.


$(window).load(function() {

 

  var strWidth;

  var strHeight;

 

  //innerWidth / innerHeight / outerWidth / outerHeight 지원 브라우저 

  if ( window.innerWidth && window.innerHeight && window.outerWidth && window.outerHeight ) {

    strWidth = $('#container').outerWidth() + (window.outerWidth - window.innerWidth);

    strHeight = $('#container').outerHeight() + (window.outerHeight - window.innerHeight);

  }

  else {

    var strDocumentWidth = $(document).outerWidth();

    var strDocumentHeight = $(document).outerHeight();

 

    window.resizeTo ( strDocumentWidth, strDocumentHeight );

 

    var strMenuWidth = strDocumentWidth - $(window).width();

    var strMenuHeight = strDocumentHeight - $(window).height();

 

    strWidth = $('#container').outerWidth() + strMenuWidth;

    strHeight = $('#container').outerHeight() + strMenuHeight;

  }

 

  //resize 

  window.resizeTo( strWidth, strHeight );

 

}); 


:

serialize()

일/Jquery 2010. 1. 28. 10:53

넘겨야할 파라미터가 너무 많거나 동적으로 생성될경우 그냥 serialize()로 넘겨버리면 OK!
: