JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 27th, 2012, 10:01 PM
tech0925 tech0925 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 306 tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 18 h 23 m 55 sec
Reputation Power: 5
Javascript/jquery CSS not working in IE

I am not sure if this code is javascript or jquery so I apologize in advance. I am having a problem with the auto search in IE. It works correctly in Firefox.


and then start typing the word cart in the search bar. You will see it lines up underneath in Firefox but is not in IE. Any help would be greatly appreciated!

Here is the code:

Code:
<script type="text/javascript">
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
    do {
        curleft += obj.offsetLeft;
        curtop += obj.offsetTop;
    } while (obj = obj.offsetParent);
}
return curleft.toString() + ' ' + curtop.toString(); }
(function() {
var nxt_host = (("https:" == document.location.protocol) ? "https://" : "http://"); nxt_host += "vector.nextopiasoftware.com/";
document.write(unescape("%3C") + "script src='" + nxt_host + "nxt-ac-js-1.3-min.js' type='text/javascript'" + unescape("%3E%3C/script%3E"));
document.write(unescape("%3C") + "link rel='stylesheet' type='text/css' href='" + nxt_host + "ac-1.3.css'" + unescape("%3E")); })(); </script> <script type="text/javascript">
(function() {
var jnxtac = jQuery.noConflict(true);
jnxtac("#myInput").css('z-index', '20000');
jnxtac("#myInput").autocomplete({cid:'80c356394c27c27aacf41c465e455f7d'});
})();
if (navigator.appVersion.indexOf("MSIE") != -1) {
var offsets  = findPos(document.getElementById('search')).split(' ');
var acStyleEl = document.createElement('style');
var acStyleCss = '.ui-autocomplete {position:absolute !important;left: ' + (parseInt(offsets[0]) +200) + 'px !important; top: ' + (parseInt(offsets[1]) + 24) + 'px !important;}';
var bodyEl = document.getElementsByTagName('body')[0];
acStyleEl.setAttribute("type", "text/css");
acStyleEl.setAttribute("id", "acCssElement");
bodyEl.appendChild(acStyleEl);
acStyleEl.styleSheet.cssText = acStyleCss; }
    </script>


Any help would be greatly appreciated!

Last edited by tech0925 : December 28th, 2012 at 12:39 AM.

Reply With Quote
  #2  
Old December 28th, 2012, 12:39 AM
tech0925 tech0925 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 306 tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 18 h 23 m 55 sec
Reputation Power: 5
I found the problem. The code was breaking in another JavaScript file

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript/jquery CSS not working in IE

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap