Ask questions and get good answers on mb.jQuery.components

The full screen function doesn't seems the work fine in ie8, someone got a solution for this (or a workaround). I also experienced this at the demo. Firefox works fine.

Greetings,

Theo Vis http://pupunzi.com/mb.components/mb.containerPlus/demo/demo.html

asked Nov 22 '10 at 16:28

theovis's gravatar image

theovis
11

edited Nov 29 '10 at 17:42


I know; it's a bug; it seams that $(window).width() doesn't return the width of the window in IE8. this is the function:

 jQuery.fn.mb_fullscreen= function(){
    var container=$(this);
    var opt= container.get(0).options;
    if (container.mb_getState('iconized') || container.mb_getState('collapsed') || container.mb_getState('closed')){
      container.attr("w",$(window).width()-40);
      container.attr("h",$(window).height()-40);
      container.attr("t",20);
      container.attr("l",20);
      container.css("height","");
      return;
    }
    container.animate({top:20,left:20, position:"relative"},200, function(){
      if (container.attr("rememberMe")){
        container.mb_setCookie("x",$(this).css("left"));
        container.mb_setCookie("y",$(this).css("top"));
      }
    });
    container.mb_resizeTo($(window).height()-40,$(window).width()-40);

    container.attr("w",$(this).outerWidth());
    container.attr("h",$(this).outerHeight());
    container.attr("t",$(this).offset().top);
    container.attr("l",$(this).offset().left);
    container.css("height","");
    container.mb_bringToFront(opt.zIndexContext);
    return container;
  };

If someone has a solution is wellcome.

answered Dec 02 '10 at 17:33

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Comment the animate function makes it work.

jQuery.fn.mb_fullscreen= function(){
    //container.animate({top:20,left:20, position:"relative"},200, function(){
      //if (container.attr("rememberMe")){
      //  container.mb_setCookie("x",$(this).css("left"));
      //  container.mb_setCookie("y",$(this).css("top"));
      //}
    //});
}

answered Dec 06 '10 at 15:08

theovis's gravatar image

theovis
11

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×9
×1
×1

Asked: Nov 22 '10 at 16:28

Seen: 712 times

Last updated: Dec 06 '10 at 15:08

jQuery main site - Matteo Bicocchi