|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Reveroom in Jquery, JavaScript
Hi Folks,
I'm *very* new to JQuery, and Javascript for that matter.
I've bolted something together that gives a 'slide' effect to a button, and would also like to trigger a popunder window on the same click. I've managed to get it to open a new window, however (in Firefox, at least) it shows the new window in view rather than the original page - hence, the sliding effect is missed (and the workflow of the design means the user needs to see the sliding bit first, then go to the new window later).
I haven't been able to find any documentation that comes close to doing what I need, so any pointers would be very much appreciated!
Existing code below;
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
|
// .js \\
jQuery(document).ready(function() {
$(".show").click(function(){
var left = $(this).next('span').css('left');
if ( left == '3px') {
$(this).next('span').animate({left:'173px'}, 1000);
} else {
$(this).next('span').animate({left:'3px'}, 1000);
}
$("a.show").click(function(){
window.open($(this).attr("href"));
return false;
});
});
});
// HTML Link \\
<a href="http://thepagetoshow.com" class="show"></a>
|
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625