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 8482601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:51:51+00:00 2026-06-10T19:51:51+00:00

For some reason I cannot make jQuery run things sequentially. See: http://jsfiddle.net/Az9E2/ I would

  • 0

For some reason I cannot make jQuery run things sequentially.

See: http://jsfiddle.net/Az9E2/

I would like to click a button, and have the following functions enacted sequentially:

  1. Give focus to the textarea
  2. Add a box-shadow to textarea
  3. Delay for 100ms
  4. Add a transition class to the textarea
  5. Remove the box-shadow and watch it fade out nicely

However, when I do it, it does everything an once, and so the box-shadow never appears.

Or, if I remove the final stage, then the box shadow fades in, meaning that (4) is happening BEFORE (2).

Any thoughts?

  • 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-10T19:51:52+00:00Added an answer on June 10, 2026 at 7:51 pm

    The .delay() method is best for delaying between queued jQuery
    effects. Because it is limited—it doesn’t, for example, offer a way to
    cancel the delay—.delay() is not a replacement for JavaScript’s native
    setTimeout function, which may be more appropriate for certain use
    cases.

    source: http://api.jquery.com/delay/


    The other points you mention of course all happen (to the eye) at once, because there is no delay preventing it.


    try: http://jsfiddle.net/JH4fM/2/

    $('#change').on('click', function () {
      var $el = $(".snapp_view_ask_question_textarea");
    
      $el.focus().css("box-shadow", "rgba(139, 0, 0, 0.5) 0px 0px 30px 2px");
      setTimeout(function () {
        $el.css("box-shadow", "");
      }, 400);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some simple jquery, and for some reason, I simply cannot make it
I want to use http://msdn.microsoft.com/en-us/library/aa370654%28VS.85%29.aspx in my code. But for some reason I cannot
there is a similar question in here but for some reason I cannot make
I have a search setup inside a div but for some reason cannot get
For some reason I cannot seem to get a ko.computed observable to compute when
I use CSS transitions fairly regularly and for some reason I cannot get them
It's a common problem, solved many times, but for some reason i cannot find
I declared a global shift operator but for some reason the compiler cannot deduct
For some reason or another I cannot figure out why the data when opened
For some reason the selected tab on TextMate is almost un-noticeable, I really cannot

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.