Need JQuery fix for IE! Help!

I’m going crazy. I’ve got my page working in IE now, all except for one little function - changing the sprite position on the toggle show/hide function. The client wants that minor issue fixed even though I’ve managed to get the stupid function working in IE…

So, you can see the page here:

Here’s the relevant code (let me know if I’m including it wrong):

<script type="text/javascript" src="js/jquery-1.5.min.js"></script>

<style type="text/css">
.accordion2 {
	float: left;
.accordion2 h3 {
padding: 5px; 
background: #ccc url(images/state3.png) no-repeat 100% 5px; 

.accordion2 h3 a
{color: #000; 

.accordion2 {
background: #ccc url(images/state4.png) no-repeat 100% 5px; 

.accordion2 p {
	background: #EAEAEA;
	margin: 5px 0;
	padding: 0px;


.biopic {
	padding:5px 7px 5px 0px;

.biocontact {
	margin:50px 0 0 0;


<script type="text/javascript">

	$(".accordion2 h3").eq(7).addClass("active");
	$(".accordion2 p").eq(7).show();

	$(".accordion2 h3").click(function(){



 <div class="accordion2"> 
              <h3 class="accordion2">
              <div class="biopic"><a name="whaley" id="whaley"></a><img src="images/whaley_headshot.jpg" alt="Greg Whaley" /></div>
                      <div class="biocontact">
                      <span class="style5">Greg Whaley</span><br />
						<span class="style2">
                      President + Owner</span><br />
                      <img src="images/icon-email.png" width="20" height="8"  alt="Email Us"/> <span class="style3"></span>
                          <p class="accordion2">Greg Whaley is the President and Owner of Academy Solutions Group, LLC. He is a retired Air Force Colonel and Command Pilot who flew both B-52 and B-1B aircraft. His military service includes command tours at the squadron and group level, as well as, staff assignments at Strategic Air Command and the National Security Agency. Following the Air Force, he worked at SAIC and General Dynamics as a Senior Program Manager and Manager of a Line of Business until launching Academy Solutions Group, LLC in 2003.    
                          <br /><br />
  He has grown Academy Solutions Group into a high-tech company specializing in support to DoD and the Intelligence Community in the areas of Cyber, Systems Engineering, Program Management Support, and System Development. His clientele includes companies such as Lockheed Martin, Northrop Grumman, SAIC, L-3, ITT, CSC, and Serco. In 2008, Northrop Grumman selected ASG as a Small Company Excellence Award recipient from among more than 4,000 eligible small companies due to its contributions in the area of Cyber Defense.   
  <br /><br />
  Greg received a BS degree from the Air Force Academy in Engineering Sciences and an MS in Operations Research from the Air Force Institute of Technology. Additionally, he has an MBA from Wharton at the University of Pennsylvania. <br />

                    <h3 class="accordion2">
                    <div class="biopic"><a name="wertman" id="wertman"></a><img src="images/wertman_headshot.jpg" alt="Chris Wertman" />
                      <div class="biocontact">
                      <span class="style5">Chris Wertman</span>
                        <br /><span class="style2">Vice President for SETA<br /> + Systems Engineer</span><br />
                        <img src="images/icon-email.png" width="20" height="8"  alt="Email Us"/> 
                        <span class="style3"></span> 
                          <p class="accordion2">Chris Wertman is Vice President for SETA at ASG.  Chris has more than 25 years of acquisition experience in the Air Force, Civil Service, and as a contractor.  With over 23 years in the U.S. Air Force Chris served in Thailand, S. Korea, Germany and several stateside locations, in the Personnel, Aerospace Engineer, and Intelligence career fields.  Chris has managed multi-task order contracts in excess of $100M each.  He has vast experience as a systems engineer with C4ISR systems development, installation, and operation.  He has extensive modeling and simulation expertise including support to the Defense Modeling and Simulation Office (DMSO).
                          <br /><br />
  He is a Project Management Professional (PMP), through the Project Management Institute.  He is also a Senior Fellow with the American Institute for Aeronautics and Astronautics (AIAA), and past member of Simulations Interoperability Standards Organization (SISO), Military Operations Research Society (MORS), Institute of Electrical and Electronics Engineers (IEEE), Armed Forces Communications and Electronics Association (AFCEA), and National Defense Industrial Association (NDIA).  Chris was an officer in SISO and a member of the IEEE Standards Committee.   
  <br /><br />
 Chris has B.S in Aerospace Engineering from the University of Oklahoma and an M.S in Management Information Systems (MIS) from Boston University. </p>





It seems that the problem is that there is an inline “filter” style being written into the accordion h3 element which makes IE8 use the alpha image loader filter. When using the filter there is no equivalent to background-position which is why the image doesn’t change.

I assume the filter was meant for IE6 which doesn’t understand png transparency but all versions of IE will see it when it is inline.

You could try hiding the filter like this:

.accordion2 > h3{filter:none!important}

That should hide the filter in ie7 and 8 with any luck

On another matter why is this image 54k? It should be about half a k.

Thanks for your reply!

Two things:
Why is the image so big? Don’t know, I was hired to fix a page that I didn’t create (to get it would work in IE) so I didn’t create the page or the images. Which makes everything EXTRA frustrating since I did not write the original code (I got it to work in IE, except the stupid arrow image doesn’t change in IE.)

  1. The page DOES work in IE6/IE7 - but the bg image does not change in those versions either - not just IE8. Does your advice still apply?


Yes it can be a pain working on other peoples code.

2. The page DOES work in IE6/IE7 - but the bg image does not change in those versions either - not just IE8. Does your advice still apply?


In IE6 you get that whole png image displayed width both states on the screen by default and stretches the gray area downwards. I doubt there's anythnig you can do for IE6 simply other than not using a transparent png image and not using the filter on it. It doesn't seem you need a png image anyway as you could just have small gif with no transparency (or just index transparency) anyway.

The code I gave you may help IE7 and 8 so try it out first. I couldn't test locally as the script that was adding the inline style wouldn't work when I copied it locally. I can tell you though that without the inline filter styling IE8 was working fine and swapping that image.

Ok, scrub the above code and just use this instead.

Put the existing call to supersleight inside the conditional comments as shown below to stop ie8 and 7 getting it as they don’t need it.

<!--[if lte IE 6]>
<script type="text/javascript" src=""></script>

Thanks for the code - I’ll give it a try and keep my fingers crossed!!


You rock! It works now in IE - I can’t thank you enough - I really didn’t want to spend my weekend tweaking someone else’s code. I changed the images to .gifs as well.

Thanks again!
Haikukitty (: