Hi guys,
I have the follow page:
- <!DOCTYPE html>
- <html>
- <head>
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- </head>
- <body>
- <div id="id1">
- <a href="#" id="button">Click</a>
- <div id="id1intern" style="display:none">
- <a href="#"><img name="test" id="test" src="test.jpg" alt="test"/></a>
- </div>
- </div>
- <div id="id2" style="position:absolute">
- <a href="#"><img name="test2" id="test2" src="test.gif" alt="test"/></a>
- </div>
- </body>
- <script type="text/javascript">
- $(function(){
- $('#button').click(function(){
- $('#id2').css('z-index', '1');
- $('#id1').css('z-index', '2');
- $('#id1intern').css('z-index', '3');
- $('#id1intern').slideToggle('medium');
- });
- });
- </script>
- </html>
I'm trying to show #id1intern (previously hidden) and make it overlap #id2. My tests have shown that #id2 is moved to the bottom. I have tried to apply the "z-index" property to the divs, but I couldn't get to work. Anyone got a tip if this is possible and how to make this work?
Thanks in advance.