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

  • Home
  • SEARCH
  • 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 8085425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:06:42+00:00 2026-06-05T18:06:42+00:00

I can’t seem to get even a simple fade-in effect to work on chrome

  • 0

I can’t seem to get even a simple fade-in effect to work on chrome or safari – but it works perfectly well with jsfiddle (Chrome 19.0.1084.56 & Safari 5.1.7). I’m also not getting any javascript errors to work off of. Previously I had tried

$(“#fade”).hide().fadeIn

which also worked fine in jsfiddle but not in my file. Interestingly, fadeOut works alright when I use it.

Here’s my code below – does it work alright for you? If you have any idea as to why it isn’t for me, please let me know!

<html>

<head>

<title>Wheee jQuery!</title>

<!-- jquery -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

<script type="text/javascript">

$("#fade").fadeTo(2000, 1);

</script>

<!-- css -->
<style type="text/css">
#fade{
    width: 150px;
    height: 30px;
    text-align: center;
    color: blue;
    border: 1px dotted blue;
    opacity: 0.3;
}
</style>

</head>

<body>


<div id="fade">
lalala
</div>   

</body>

</html>
  • 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-05T18:06:43+00:00Added an answer on June 5, 2026 at 6:06 pm

    By default, JSFiddle has OnLoad selected which runs the code found within the JavaScript panel within a body.onload event. Your code on the other hand runs the code unwrapped in the header. To simulate that situation in JSFiddle, select No Wrap instead of OnLoad and your code will all of a sudden not work, just like on your server.

    To solve this problem, wrap your code in

    $(document).ready(function(){
        $("#fade").fadeIn(2000);
    });
    

    Sample of JSFiddle with No Wrap: http://jsfiddle.net/3cXvL/1/

    An alternative solution is to place your code after the div that it needs to affect.

    <div id="fade"></div>
    <script>
        $("#fade").fadeIn(2000);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't seem to figure out what's wrong with the simple getJSON call below. It's
Can't seem to get the Back Button to appear in a UINavigationController flow. I
Can someone please explain why this doesn't work? MyClass myClass1 = new MyClass(); object
Can any one tell me clearly why ? Reading is simple in ArrayList,( we
Can some one Guide me to work with these things... What is Model popup
can anyone tell me why this doesn't work? db = openOrCreateDatabase(database.db, SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setLocale(Locale.getDefault());
Can't work out a way to make an array of buttons in android. This
Can anyone help me trying to find out why this doesn't work. The brushes
Can i get the source code for a WAMP stack installer somewhere? Any help
Can someone please explain to me in a simple way why constants don't matter

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.