Solved

IE offset

Posted on 2008-06-11
4
1,171 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now