Solved

IE offset

Posted on 2008-06-11
4
1,177 Views
Last Modified: 2010-04-21
Hello Experts,
I have an animation on the page which triggers when the user click on the icon, it is working fine in FF however, the offset in IE is incorrect, I mean the starting position of the animation.
If you could please see the attached IE screenshot, you would know what I mean here.
Animation for "highfield,ashley" should start from its position (where the name is printed) however, it is starting from some vague position, its target position is in the left Short List Menu where it will go and sits.
Please can you advice me what needs to be done to make it work in both the browsers.
thanks for your help
regards
sam
0
Comment
Question by:newbie27
  • 3
4 Comments
 
LVL 8

Author Comment

by:newbie27
ID: 21759664
hello,
i have used the following to make the offset work in IE

var spigot = $(this).after('<div id="' + theId + '_spg" style="left:' + $(this).offset().left + 'px; top:' + ($(this).offset().top-100) + 'px; position: absolute; background:#fef8a5; z-order: 6000; ">' + myTitle + '</div>');
        if($.browser.msie===true)
                spigot = $(this).after('<div id="' + theId + '_spg" style="left:' + $(this).offset().left + 'px; top:' + ($(this).offset().top-80) + 'px; position: absolute; background:#fef8a5; z-order: 6000; ">' + myTitle + '</div>');

 the animation have started appearing from the correct position, however, it is leaving the yellow background behind in IE ....

please can someone advice
0
 
LVL 8

Author Comment

by:newbie27
ID: 21798334
wilg32,
i have reverted back the changes for now just to show you the effects I had earlier, I mean, you can either click on individual icons to add the record to the list or you can also add all the record ids to the short list by clicking on the icon in the table header....
i wanted the animation to remove completely for this .addAll event and IE offset, these were the two desired changes ...

hope this helps to understand the situation?

thanks for your help
0
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 21799289
try:
   var spigot;
 if($.browser.msie===true)
{
spigot = $(this).after('<div id="' + theId + '_spg" style="left:' + $(this).offset().left + 'px; top:' + ($(this).offset().top-100) + 'px; position: absolute; background:#fef8a5; z-order: 6000; ">' + myTitle + '</div>');
}
else
{
 spigot = $(this).after('<div id="' + theId + '_spg" style="left:' + $(this).offset().left + 'px; top:' + ($(this).offset().top-80) + 'px; position: absolute; background:#fef8a5; z-order: 6000; ">' + myTitle + '</div>');
}
$('#'+ theId + '_spg').offset((($('#shortlist').offset().top)-110), (($('#shortlist').offset().left)-0), (anim)?400:1);
  
$(this).animate({opacity: "0.3"}, 500); 

Open in new window

0
 
LVL 8

Author Closing Comment

by:newbie27
ID: 31466138
thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question