Skip to main content

Bug Tracker

Side navigation

#967 closed bug (invalid)

Opened February 15, 2007 11:10PM UTC

Closed October 13, 2009 12:02AM UTC

Last modified March 14, 2012 07:54PM UTC

bug in plugin center

Reported by: agustin.garcia@hispa Owned by:
Priority: trivial Milestone:
Component: plugin Version:
Keywords: Cc:
Blocked by: Blocking:
Description

My name's Agustin and I'm from Spain.

I'm begining with jquery and I want tell you I find one bug in plugin "center".

With IE 6 and doctype XHTML this plugin not work. This a know problem,

look http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/offsetheight.asp

Well, I propose this change:

******************************************************************************************************************************

if (window.innerHeight)

var clientHeight = window.innerHeight;

else if(document.body && document.body.offsetHeight)

var clientHeight = document.body.offsetHeight;

ADD THIS LINE ===>>>>> if (document.body.offsetHeight == 0) clientHeight = document.documentElement.offsetHeight; /* arreglar doctype + xhtml en IE */

s.top = ((clientHeight - parseInt(jQuery.css(this,"height")))/2) + "px";

} else {

s.top = "0";

}

*********************************************************************************************************************************************************

This work for me and I want share this, but dont know how. I love jquery. Thanks.

Note: Excuse me my english.

Attachments (0)
Change History (2)

Changed February 17, 2007 08:26AM UTC by anonymous comment:1

Sorry.

The line is

/*-------------------------*/

if (clientHeight ==undefined) {clientHeight = document.documentElement.offsetHeight;} /* arreglar doctype + xhtml en IE */

/* -----------------------*/

Thanks

Changed October 13, 2009 12:02AM UTC by dmethvin comment:2

description: My name's Agustin and I'm from Spain.\ I'm begining with jquery and I want tell you I find one bug in plugin "center".\ \ With IE 6 and doctype XHTML this plugin not work. This a know problem, \ look http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/offsetheight.asp\ Well, I propose this change:\ ******************************************************************************************************************************\ if (window.innerHeight) \ var clientHeight = window.innerHeight;\ else if(document.body && document.body.offsetHeight)\ var clientHeight = document.body.offsetHeight;\ ==ADD THIS LINE ===>>>>> if (document.body.offsetHeight == 0) clientHeight = document.documentElement.offsetHeight; /* arreglar doctype + xhtml en IE */\ s.top = ((clientHeight - parseInt(jQuery.css(this,"height")))/2) + "px";\ } else { \ s.top = "0";\ }\ *********************************************************************************************************************************************************\ \ This work for me and I want share this, but dont know how. I love jquery. Thanks.\ Note: Excuse me my english.\ \ My name's Agustin and I'm from Spain. \ I'm begining with jquery and I want tell you I find one bug in plugin "center". \ \ With IE 6 and doctype XHTML this plugin not work. This a know problem, \ look http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/offsetheight.asp \ Well, I propose this change: \ ****************************************************************************************************************************** \ if (window.innerHeight) \ var clientHeight = window.innerHeight; \ else if(document.body && document.body.offsetHeight) \ var clientHeight = document.body.offsetHeight; \ ==ADD THIS LINE ===>>>>> if (document.body.offsetHeight == 0) clientHeight = document.documentElement.offsetHeight; /* arreglar doctype + xhtml en IE */ \ s.top = ((clientHeight - parseInt(jQuery.css(this,"height")))/2) + "px"; \ } else { \ s.top = "0"; \ } \ ********************************************************************************************************************************************************* \ \ This work for me and I want share this, but dont know how. I love jquery. Thanks. \ Note: Excuse me my english. \ \
need: → Review
resolution: → invalid
status: newclosed

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .