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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:57:41+00:00 2026-05-16T16:57:41+00:00

It’s weird! I was working on my CSS and jquery just stopped working! checked

  • 0

It’s weird! I was working on my CSS and jquery just stopped working! checked in firefox/chrome and the jquery just stopped working! I have no idea what happen.

I have 2 functions going on. First part animates the header image and the second part generates random numbers when it is click. I pasted my whole code at pastebin.

<!DOCTYPE html>
<html lang="en">
<head>
  <title> Hello </title>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="css/reset.css">
  <link rel="stylesheet" href="css/default.css">

  <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->

  <script src="js/jquery.js"></script>
</head>
<body>
  <!-- #header Image -->
  <img id="header" src="images/header.png" width="424" height="63" alt="Header">
  <!-- /#header Image -->
  <div id="main-wrapper">
    <h1> Your points will be genarated below </h1>

    <form>
      <input id="points" type="text"/>
      <input type="button" id="generate" value="Generate Points!" />
    </form>

  </div><!-- /#main-wrapper -->
  <!-- Generate -->
  <script src="js/gen.js" type="text/javascript" charset="utf-8"></script>

</body>

$(document).ready(function(){
      // Makes the image go under the div wrapper.
     $('img#header').css({'position' : 'relative', 'top' : '17px', 'z-index' : '50' })
    //create the animation
     $('img#header').hover(function()
  {
    $(this).filter(':not(:animated)').animate({"top": "-3px" }, "slow");
      }, function() {
    $(this).stop().animate({"top": "17px"}, "slow");
  });



  // Generate Numbers 
    $("#generate").click(function(){
      var code = "";
      var alphabet = new Array('A', 'B', 'C', 
               'D', 'E', 'F', 
               'G', 'H', 'I', 
               'J', 'K', 'L', 
                 'M', 'N', 'O', 
                 'P', 'Q', 'R', 
               'S', 'T', 'U', 
               'U', 'V', 'W', 
                 'X', 'Y', 'Z');
        var count = 5 * 4;
        for (var i=0; i<count; i++){
          var number = false;
          var type = Math.round(Math.random() * 2);
          if (type == 0) number = true; else number = false;
            var output;
            if (number){
              code += String(Math.floor(Math.random() * 10));
          }
            else
          {
            var ranChar = Math.floor(Math.random() * alphabet.length)
            code += alphabet[ranChar];
          }
          if (((i+1) % 5 == 0) && i != count-1) code += "-";
        }
          $("#points").val(code);
      });
    });


body { background: #0d0d0d url(../images/body-bg.jpg) repeat; width: 500px; margin: 154px auto; } 
img#header { padding: 0 41px; }

div#main-wrapper { background: #dfdfdf; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; position: relative; z-index: 1000; padding:                       44px  64px; -webkit-box-shadow: 0 0 10px #000; -moz-box-shadow: 0 0 10px #000; box-shadow: 0 0 10px #000;  }

div#main-wrapper h1 { color: #0d0d0d; font: italic bold 1.2em Georgia, Arial, Serif; text-align: center; text-shadow: -1px 1px 0 #fff; margin-bottom: 38px; }

/* Form Generator */
form {}
form input[type="text"]#points { background: #d6d6d6; border: 1px #909090 solid; display: block; font: bold 1.3em Arial, Serif; margin: 0 auto; padding: 10px;  }
form input[type="button"]#generate { background: #2d69bd; background: -webkit-gradient(linear, 0% 0%, 0% 71%, from(#3171CA), to(#15396F)); background: -moz-linear-gradient(21% 74% 90deg,#15396F, #3171CA); border: 1px #5b93d1 solid; border-radius: 16px; -webkit-border-radius: 16px; -moz-border-radius: 16px; padding: 10px; }

The css and jquery was working, then for some reason it stopped working.

  • 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-16T16:57:42+00:00Added an answer on May 16, 2026 at 4:57 pm

    You say your jQuery was working fine until you starting working on your CSS. Could it be because you’re not closing your CSS includes:

    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/default.css">
    

    Should be:

    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/default.css" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.