1

I'm trying to change a div position with jquery and it works fine in chrome but not in IE7

Jquery is loaded, but the attribute isn't changed. Help would be appreciated. Thanks in advance.

$('#tooltip1').css('left', '500px');
3
  • When are you calling this css change? Commented Aug 16, 2013 at 17:38
  • kindly post your code in js fiddle. second you can add following into your css code. #tooltip1 {position: relative;} Commented Aug 16, 2013 at 17:44
  • jsfiddle.net/avilao/BRZWV/3 Here is the code. It provides a custom tooltip for google chart. This is working on chrome, but not on IE7. The issue is the css not being dinamicaly updated (with the position). The line of code in the first post is also working on chrome and IE7. I'm using jquery-1.7.1.min.js Commented Aug 21, 2013 at 14:57

1 Answer 1

1

Make sure you're using jQuery 1.x and not 2.x, as 2 drops support for older versions of IE.

(I'd have posted this as a comment but I don't have enough reputation).

Edit:

While I still don't have a complete answer, the problem appears to stem from the treemap.draw function. When commenting out tree map.draw(data, options), the tracking works in IE as expected (once you put position:relative on the #tooltip1 itself, as someone mentioned in a previous comment). In addition, I created a #foo element to test the mousemove event with, and it works fine.

This leads me to believe that treemap.draw does something that gets in the way of the event handler in IE7 (and IE8), or unbinds the event entirely.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm using jquery-1.7.1.min.js. I added a JS Fiddle in the previous comment!
Ok, I did some research, added some suggestions above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.