JQuery images roll over effect not working in IE8
Hi
I'm doing a micro-site with a grid of images, i created a bit of code to do a simple roll-over so when you are over the images display a blue panel with titles. It works fine in Firefox, Chrome and Safari but IE8 is not working at all.
here is the link for the live version:
Could you guys give me directions and tips so I know what i am doing wrong, I will appreciate it. thanks in advance.
Jquery Code I put it in the header, just put it here to make it easy
- $(document).ready(function() {
- $("a.titlemask").hover(
- function() {
- $(this).children('.shide').show();
- }, function() {
- $(this).children('.shide').hide();
- });
- $("a.titlemask2").hover(
- function() {
- $(this).children('.shide').show();
- }, function() {
- $(this).children('.shide').hide();
- });
- });
html code:
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- <title>Lowe and Partners</title>
- <link href="css/main.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
- <script type="text/javascript" src="js/flowplayer-3.2.6.min.js"></script>
- <script type="text/javascript">
-
- $(document).ready(function(){
-
-
- $("a.titlemask").hover(
-
- function() {
- $(this).children('.shide').show();
-
- },
-
- function() {
- $(this).children('.shide').hide();
-
- });
-
-
- $("a.titlemask2").hover(
-
- function() {
- $(this).children('.shide').show();
-
- },
-
- function() {
- $(this).children('.shide').hide();
-
- });
-
- });
-
-
- </script>
-
-
- </head>
- <body>
- <div id="wrap">
- <div class="thumb"><img src="images/lowe.gif" alt="lowe" width="219" height="219" /><a class="titlemask" href="#"><span class="shide">Download<br/>Credentials</span></a></div>
-
- <div class="thumb"><img src="images/thumb-omo.jpg" alt="thumb-omo" width="219" height="219" /><a class="titlemask" href="set-me-free-omo.html" target="_self"><span class="shide">Set Them Free<br/><em>Omo</em></span></a></div>
-
- <div class="thumb"><img src="images/thumb-organ-honors.jpg" alt="thumb-organ-honors" width="219" height="219" /><a class="titlemask" href="leila-organ-donors.html" target="_self"><span class="shide">Leila<br/><em>Organ Donors</em></span></a></div>
-
- <div class="thumb double"><img src="images/thumb-the-force.jpg" alt="thumb-the-force" width="451" height="219" /><a class="titlemask2" href="the-force.html" target="_self"><span class="shide">The Force<br/><em>Volkswagen Passat</em></span></a></div>
-
- <div class="thumb"><img src="images/thumb-criket.jpg" alt="thumb-criket" width="219" height="219" /><a class="titlemask" href="cricket-ki-khushi-coca-cola.html" target="_self"><span class="shide">Cricket Ki Khushi<br/><em>Coca-Cola</em></span></a></div>
-
- <div class="thumb"><img src="images/thumb-the-cleaner.jpg" alt="thumb-the-cleaner" width="219" height="219" /><a class="titlemask" href="the-cleaner-axe.html" target="_self"><span class="shide">The Cleaner<br/><em>Axe</em></span></a></div>
-
- <div class="thumb"><img src="images/thumb-rivers-of-light.jpg" alt="thumb-rivers-of-light" width="219" height="219" /><a class="titlemask" href="rivers-of-light.html" target="_self"><span class="shide">Rivers of Light<br/><em>Colombian Ministry of Defence</em></span></a></div>
-
- <div class="thumb"><img src="images/thumb-contagion.jpg" alt="thumb-contagion" width="219" height="219" /><a class="titlemask" href="contagion-trailer.html" target="_self"><span class="shide">Contagion Trailer<br/><em>Contagion</em></span></a></div>
-
- </div>
- <div class="footer">
- <div class="txt-footer"><p>© 2012 Lowe and Parttners Worldwide<br/>
- Powered by Lowe and Partners IT </p></div>
- <img src="images/lowe-small.gif" alt="lowe-small" width="49" height="33" />
- </div>
-
- </body>
- </html>
here is the css
- A:link, A:visited, A:active {font-family: 'Avenir_light_custom', times, serif; font-size: 14px; color:#76bbe5;}
- A:hover {text-decoration: underline; color: #aad8f4;}
- body {
- background:#fff;
- }
-
- img {
- border-style: none;
- }
- #wrap {
- background:#fff;
- width: 705px;
- margin: 36px auto;
- margin-top: 72px;
- }
- #main {
- width: 519px;
- height: 291px;
- margin: 0 auto;
- }
- .controls {
- margin: 0 auto;
- width: 519px;
- height: 20px;
- margin-top: 10px;
- }
- .controls p {
- font-family: 'Avenir_light_custom', times, serif;
- font-size: 14px;
- line-height: 16px;
- color: #666;
- float: left;
- }
- .controls a {
- font-family: 'Avenir_light_custom', times, serif;
- font-size: 14px;
- line-height: 16px;
- float: right;
- }
- .thumb {
- width: 219px;
- height: 219px;
- float: left;
- margin: 6px;
- position: relative;
- z-index: 1;
- }
- .thumb.double {
- width: 451px;
- height: 219px;
- float: left;
- }
- a.titlemask:link, a.titlemask:visited, a.titlemask:active {
- position: absolute;
- top:0;
- left: 0;
- z-index: 22;
- display: block !important;
- width: 201px;
- height: 201px;
- padding: 9px;
- color: #fff;
- text-decoration: none;
- font-size: 14px;
- line-height: 15px;
- text-transform: uppercase;
- }
- a.titlemask:hover {
- background-color: rgba(105, 173, 222, 0.8);
- }
- a.titlemask2:link, a.titlemask2:visited, a.titlemask2:active {
- position: absolute;
- top:0;
- left: 0;
- z-index: 22;
- display: block !important;
- width: 433px;
- height: 201px;
- padding: 9px;
- color: #fff;
- text-decoration: none;
- font-size: 14px;
- line-height: 15px;
- text-transform: uppercase;
- }
- a.titlemask2:hover {
- background-color: rgba(105, 173, 222, 0.8);
- }
- .titlemask span em, .titlemask2 span em {
- font-size: 11px;
- }
- /*
- .thumb a:link, .thumb a:visited, .thumb a:active {
- position: absolute;
- top:0;
- left: 0;
- z-index: 22;
- display: block;
- width: 219px;
- height: 219px;
- background-color: green;
- }
- .thumb a:hover {
- position: absolute;
- top:0;
- left: 0;
- z-index: 22;
- display: block;
- background-color: purple;
- }
- */
- .titlemask span, .titlemask2 span {
- display: none;
- }
- .footer {
- width: 705px;
- margin: 36px auto;
- overflow: hidden;
- border-top: 57px solid #fff;
- }
- .header {
- width: 705px;
- margin: 36px auto;
- overflow: hidden;
- border-bottom: 57px solid #fff;
- }
- .txt-footer {
- width: 200px;
- height: 30px;
- float: left;
- margin-left: 450px;
- }
- .txt-footer p {
- padding-top:5px;
- font-family: 'Avenir_light_custom', times, serif;
- font-size: 10px;
- line-height: 14px;
- color: #999;
- text-align: right;
- }
- .footer img {float: right; border-right: 16px solid #fff;}