[ticket/218] Fix undefined background-position in IE 8/9
This will only take care of the errors that show in IE 8/9. The clock still doesn't properly show in at least IE8. B3P-218
This commit is contained in:
@@ -20,9 +20,16 @@ phpbb.b3pFlipClock = function(identifierUp, identifierDown, val, type) {
|
|||||||
var backIdUp = identifierUp.replace('-front-', '-back-');
|
var backIdUp = identifierUp.replace('-front-', '-back-');
|
||||||
var backIdDown = identifierDown.replace('-front-', '-back-');
|
var backIdDown = identifierDown.replace('-front-', '-back-');
|
||||||
var backPosition = $(backIdUp).css('background-position');
|
var backPosition = $(backIdUp).css('background-position');
|
||||||
var backPositionLength = backPosition.length;
|
var backPositionLength;
|
||||||
var backY;
|
var backY;
|
||||||
|
|
||||||
|
// Workaround for Internet Explorer bug
|
||||||
|
if (backPosition === undefined) {
|
||||||
|
backPosition = $(backIdUp).css('background-position-x') + ' ' + $(backIdUp).css('background-position-y');
|
||||||
|
}
|
||||||
|
|
||||||
|
backPositionLength = backPosition.length;
|
||||||
|
|
||||||
if (backPosition.substring(backPositionLength - 3, backPositionLength - 2) === '0') {
|
if (backPosition.substring(backPositionLength - 3, backPositionLength - 2) === '0') {
|
||||||
backY = '0px';
|
backY = '0px';
|
||||||
} else {
|
} else {
|
||||||
@@ -59,6 +66,12 @@ phpbb.b3pFlipClock = function(identifierUp, identifierDown, val, type) {
|
|||||||
|
|
||||||
// now get the vertical offset of the bottom digit
|
// now get the vertical offset of the bottom digit
|
||||||
backPosition = $(identifierDown).css('background-position');
|
backPosition = $(identifierDown).css('background-position');
|
||||||
|
|
||||||
|
// Workaround for Internet Explorer bug
|
||||||
|
if (backPosition === undefined) {
|
||||||
|
backPosition = $(backIdUp).css('background-position-x') + ' ' + $(backIdUp).css('background-position-y');
|
||||||
|
}
|
||||||
|
|
||||||
backPositionLength = backPosition.length;
|
backPositionLength = backPosition.length;
|
||||||
|
|
||||||
if (backPosition.substring(backPositionLength - 3, backPositionLength - 2) === '0') {
|
if (backPosition.substring(backPositionLength - 3, backPositionLength - 2) === '0') {
|
||||||
|
|||||||
Reference in New Issue
Block a user