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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:06:15+00:00 2026-05-25T00:06:15+00:00

I have a problem with JQuery and inset Box-Shadow. First of all I have

  • 0

I have a problem with JQuery and inset Box-Shadow.

First of all I have a input field.

<input id="name" name="name" type="text" />

That field has the following css styles:

 #contact input[type="text"] {
     background: rgba(55,55,55, 0.6);
     height:2em;
     border: 1px dashed #666;
     width:200px;
     box-shadow:inset 0px 0px 10px #222;
     border-radius: 2px;
}

Okay. Now the JQuery part:

What I want to do! If I hover over my input field i want an “outer” box-shadow. Like: boxShadow: “0px 0px 15px #750082”. But the inset box-shadow should be the same!!

$(document).ready(function(){
    $("#message").hover(
        function()
            {$(this).stop().animate({boxShadow: "0px 0px 15px #750082"},800);
            },
        function()
            {$(this).stop().animate({boxShadow: "inset 0px 0px 10px #222222"});

    });
});

The problem is that the “outer” box shadow will be displayed as an inset box-shadow.
But I want an “outer” box-shadow and a inset box-shadow!

So whats wrong with my solution? Has someone a better one?

Best regards

edit
I’m using JQuery 1.6.2, for the boxshadow I’m using http://www.bitstorm.org/jquery/shadow-animation/test.html Plugin!

  • 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-05-25T00:06:16+00:00Added an answer on May 25, 2026 at 12:06 am

    here are two options to get the same desired result

    example jsfiddle

    1: Use a wrapper for the <input>

    <span id="nameWrapper">
        <input id="name" name="name" type="text" value="" />
    </span>
    

    jQuery:

    $("#name").hover(function() {
        $(this).parent().stop().animate({
            boxShadow: "0px 0px 15px #750082"
        }, 800);
    }, function() {
        $(this).parent().stop().animate({
            boxShadow: ""
        }, 800);
    });
    

    2: Use CSS3 transitions instead

    CSS:

    #contact input[type="text"] {
        background: rgba(55,55,55, 0.6);
        height:2em;
        border: 1px dashed #666;
        width:200px;
        box-shadow:inset 0px 0px 10px #222;
        border-radius: 2px;
        outline:0;/* prevent webkit highlight on focus */
        -webkit-transition: all 0.8s ease-in-out;
           -moz-transition: all 0.8s ease-in-out;
            -ms-transition: all 0.8s ease-in-out;
             -o-transition: all 0.8s ease-in-out;
                transition: all 0.8s ease-in-out;
    }
    #contact input[type="text"]:hover {
        /* set both shadows */
        box-shadow:inset 0px 0px 10px #222,0px 0px 15px #750082;
    }
    

    you may consider writing the author of the shadow plugin to notify him/her of this issue.

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

Sidebar

Related Questions

I have an input text field that needs to be limited as to what
I want to raise a jQuery Dialog box which has 2 buttons. So that
I have an input element that I am using with jQuery mobile. What happens,
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have problem to add jQuery to some existing code, please help. We have
I have a problem with jQuery parallax effect for my body's background. Here is
I have a problem with jQuery, I want to change a DIV (not the
I have a problem with Jquery function getJSON, the action url does not trigger
I have some problem with Jquery Autocomplete plugin ( http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ ) I got it
I have a problem with Jquery UI modal dialogs. I have modal dialog (dialogA),

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.