Want to open a new page at the end of an animation
I still haven't been able to figure this out through the jQuery directory, but I suspect the answer isn't that difficult;
I have a picture that links to a new page in my html. When the user clicks the image, I want a black box to wipe across the image, then load a new page. I can do one or the other, but I don't know how to do both. Here is my code as it is currently written:
- <style>
- .wipe2right {
- background-color: #111;
- position: absolute;
- top: 0px;
- width: 228px;
- height: 158px;
- right: 0px;
- }
- </style>
- </head>
<body id="page1">
- <p id="noScript">enable JavaScript, you moron!</p>
- <div class="extra">
- <div class="main">
- <div class="menu">
- <ul id="clickme">
- <li class="m1"><a href="http://www.willyworld.org"><img src="images/m1.jpg" border=0 /></a></li>
- </ul>
- </div>
- </div>
- </div>
- <script src="jquery-1.5.js"></script>
- <script>
- $('document').ready(function() {
- $('#noScript').remove();
- $('<div class="wipe2right"> </div>').appendTo('.m1');
- $('.m1').ready(function(){ $('.wipe2right').animate( { width:0 }, 700, function() { }); });
- $('.m1 img').mouseover(function(){ $(this).animate( { opacity:0 }, 250, function() { }); });
- $('.m1 img').mouseout(function(){ $(this).animate( { opacity:1 }, 350, function() { }) });
- $('ul').click(function(){ $('.wipe2right').animate( { width:228 }, 350, function() { }) });
- });
- </script>
- </body>