Kelvin,

try this:

$(window).resize(setWidth);
      $(document).ready(setWidth);

      function setWidth() {
        var de = document.documentElement;
        var w = (window.innerWidth || (de && de.clientWidth)
          || document.body.clientWidth) < 800 ?"alt":"main";
            $("#rightSideContent").attr( "className", w + "Peekaboo" );

      }


and in your stylesheet:

            .mainPeekaboo {//style declarations here}
            .altPeekaboo  {display:none}

(posted by John Resig, sometime last year - and works well)

:-)

On 05/08/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
>
> There is a plugin called dimensions.  It gives all kinds of good functions
> for getting sizes.
> http://jquery.com/plugins/project/dimensions
>
> I had made a sample page using it here:
> http://www.commadot.com/jquery/dimensions/
>
> Glen
>
> On 8/4/07, Kelvin Park <[EMAIL PROTECTED]> wrote:
> >
> >
> > I am trying to allow a right side content area on my website to
> > disappear when browser width shrinks down to 800 pixels. Do you know how
> >
> > to detect browser width with jquery in real time?
> >
> >
>

Reply via email to