viewport

Average/max viewport height

What is the average and/or max height of viewport (visible area) on 1024x768 resolution screen? I'd like to know what is considered 'below the fold' for this resolution. Thanks! ...

Using jquery to get element's position relative to viewport

What's the proper way to get the position of an element on the page relative to the viewport (rather than the document). offsety/x seemed promising: http://docs.jquery.com/CSS/offset But that's relative to the document. Is there an equivalent method that returns offsets relative to the viewport? ...

Need someone to verify that my math is correct

I've been sitting with a pencil for the better part of the evening trying to recall how to implement a scalable viewport that can navigate a 2D area. It's been a while since I've first heard of it, but I think I've figured it out, I just need to verify. We have a 2D world with a "classic" cartesian coordinate system, x-axis points to th...

EXT JS toLayout on Viewport doesnt show anything...

After reading many example about adding new components in to existing container without reloading whole page I run in to small problem while combining tree and tabs inside Viewport component. What I'm trying to do is to register on click event to tree node and load in to content container new component, depending on node type it can be ...

Find the exact height and width of the viewport in a cross-browser way (no Prototype/jQuery)

I'm trying to find the exact height and width of a browser's viewport, but I suspect that either Mozilla or IE is giving me the wrong number. Here's my method for height: var viewportHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; I haven't...

Trailing/Smeared WPF 3D Drawings on Mouse Move event using ScreenSpaceLines3D (C#)

Hi, I'm having a problem when drawing a 3D line on MouseMove event in WPF. The drawing seemed to be trailing (like mouse cursor-trailing effect)/smeared in Viewport3D, and it doesnt 'clean' the previous drawing (from previous mouse move) I'm using ScreenSpaceLines3D from CodePlex to draw the 3D line on top of a 3D cube. I want it to b...

Part of website independent of iPhone’s zoom

Is it possible to have a menu bar (navigation bar) on a web site that is independent of iPhone’s zoom (i.e. with fixed width and height) while the rest of the site can be zoomed in and out? With meta "viewport" I can set the zoom of the whole website, I want to exclude some parts. It seems that it can't be done by using iFrames or CSS ...

Wpf Viewport Coordinates

Hey guys, Im working with wpf 3d, im currently writing a program that will create 3d tiles across the screen left to right, But i need to know what my bounds are on the X, Y i.e (-x-0) (0-x+) so I know when to start another row of tiles. My initial thoughts are trying to figure out a complex algorithm to go from pixels to screen coordina...

width=device-width not working in Mobile IE

Hi, I'm trying to make a website that works well on mobile phones. So far every phone that I have tested works well, but phones with Windows Mobile IE. It seem that Mobile IE just reads over the <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/> and is not setting the width to device...

OpenGL 2.0 ES coordinates

Hello, I'm doing my first steps with OpenGL ES 2.0 trying things on my ipod touch. I was wondering how to solve this coordinates issue.. To explain better, I was trying to draw a quad and rotate/translate it using a vertex shader (also because from what I've read it seems the only way to do it). Since I'm working with a ipod I have a 1...

gluOrtho2D and glViewport

Hi, I have an object defined in world coordinates, say a circle centered at (2,3) with radius 4. If I want the circle to not be distorted, to be entirely visible in the viewport and to be as big as possible within the viewport, how can I formulate a gluOrtho2D command to create a world window based on the aforementioned specs given that...

Bug when changing iPhone viewport with javascript

I'm building a web iPhone app that involves changing the viewport on demand with Javascript. I do this by changing the content attribute of the tag. This works well most of the times, except when orientation change is involved. Everytime I try to change the viewport after an orientation change event, the page doesn't zoom to it's ...

position content relative to a fluid width element set to position:fixed

I have a layout with the following requirements An image on the left side, and content on the right side. The image is pinned to the bottom left of the viewport The image does not move when the user scrolls The image resizes to 100% height of the viewport, up to it's max height. (I don't want the image to distort in it's attempts to be...

Toggle element based on viewport & scrolling

I'm trying to toggle an element based on the viewport and scrolling. By using $(window).scroll(function().. I can fire an event when the user scrolls but how do I check whether you're scrolled to the top in order to hide the element? ...

Determining if an offset is in between line numbers?

hi I need to determine if a given selection is in between a start line and an end line. I have an ILineRange and a given offset within the viewport of eclipse. (I need to know, if the selection (from a remote party) was made within the current viewport of the local user. Unfortunately, I cannot get an ILineRange from the selection. I mus...

Android browser crashes on Ajax calls, when viewport meta tag is defined

I am building a web app, which is intended to run on the Android browser. When I have a webpage that contains any kind of viewport meta tag, like this: <meta name="viewport" content="width=400"/> My webpage crashes on ajax calls. It happens when using the emulator, the actual browser on my nexus one, and on a droid (all running Andro...

Get position of the "viewport" in mobile safari?

Is there a way to determine the position of the "viewport" in mobile safari on a web page? Like x, y, w, h pixel positions of what the phone is currently seeing on the page? ...

jQuery: How can I check if a block in my document is inside the viewport or outside of it?

I am basically trying to trigger a function if the footer is inside the viewport. How can I check whether the footer is currently visible in the viewport? I assume I will have to put it into the $(window).scroll() event so that the listener becomes true once the footer becomes visible but what the function should be I just can't figure...

Webkit iPhone App : How to dynamically change the user zoom (or scale, pich & zoom) in the viewport ?

I use JQTouch for an iPhone app. JQtouch disable by default the possibility to pinch&zoom the page. For one page (containing a big image), i need to enable the pinch & zoom feature. This is easy : var viewport = $("head meta[name=viewport]"); viewport.attr('content', 'width=320, initial-scale=1, maximum-scale=10.0, minimum-scale=1, user...

How to show div when user reach bottom of the page?

When user scrolls to the bottom of the page I want to show some div, with jQuery of course. And if user scrolls back to he top, div fade out. So how to calculate viewport (or whatever is the right name) :) Thanks ...