Jump to content

Javascript slide effect


Lukapotamus

Recommended Posts

Hi All,I am quite new to javascript so I was wondering if you could help me out. I have a page that you can see here http://www.gp-surveyors.com/index.php that I am building for a client. The element in question is the animation you can see at the top of the page, here is the code for that animation; <script type="text/javascript"> function slideLeft(block){ $(block).animate({ width: "600px", opacity: 1.0 }, 700 ); } </script>This currently works great no errors at all but as you can see once you have hovered over the togglers at the side of the animation once you cant hover over them again, I need to set the zIndex of the element in question within the above function, I have looked at a lot of code and I thought the below would work; <script type="text/javascript"> function slideLeft(block){ document.getElementById(block).style.zIndex ="5"; $(block).animate({ width: "600px", opacity: 1.0 }, 700 ); } </script>Can anybody tell me where I am going wrong?Thanks. Luke

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...