Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8816343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:36:00+00:00 2026-06-14T04:36:00+00:00

I have a simple slide animation after an img link is clicked. The client

  • 0

I have a simple slide animation after an img link is clicked.
The client is requesting the link open in a new window/tab.
Every option I have tried window.openor window.location = href; with the var href = this.href; set, does not work.

$("#coatings").click(function(event) {
         event.preventDefault();
         var href = this.href;

         $("#sqeeguee_rightLink").fadeIn(100).animate({
            right:'-=450px'                 
         }, 2000,
         function() {
             window.location = href;
         });
     });

HTML:

<div id="sqeeguee_rightLink"></div>
        <a href="url here" target="_blank" id="coatings"><img src="coatings.jpg" width="456" height="592" alt="" /></a>

Any input would be great!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:36:01+00:00Added an answer on June 14, 2026 at 4:36 am

    The code you’ve quoted presumably “doesn’t work” because after the animation is complete, the new URL is opened in the same window. You’ve cancelled the event that would have opened the new window (by calling event.preventDefault()).

    Your window.open attempt fails because modern browsers only allow JavaScript code to open windows during the processing of a user-initiated event (such as a click). Your animation is started by the user-initiated event, but then allows the event handler to complete, so when you try to do window.open, as far as the browser is concerned, you’re opening a spam window, and its popup block prevents that from happening. 🙂

    If your goal is to show an animation on the current window, and then open a new window when it’s done, I’m afraid there’s no clean way to do that. You might be able to allow the original new window to open but get it to go to the background (a “pop-under”), and then when the animation is complete, bring it to the foreground. I can’t see that as a great user experience, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple slide action for LinearLayout View using TouchListener . The problem
So, I have this simple code $('#info_name'+index).show(slide, {direction: right}, 1000, function(){ $('#info_info'+index).show('slide',{direction: up}, 1000);
I'm working on a simple client side interface where I have a jQuery object
I want a simple slide down / up animation on a mouse over of
I created a simple 'slide' animation that works fine the first time it's played,
Well..I have a simple animation that slides 2 image views left and right.. when
I'm working with a simple animation instruction: $('.slide').stop().animate({ queue: true, marginTop: total + 'px'
I'm trying out the new LayoutTransition class in Honeycomb. I have set an animation
I have a simple jQuery animation that moves a div to the right or
I have written a short simple Jquery animation code. Which takes the rel attribute

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.