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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:22:47+00:00 2026-06-05T22:22:47+00:00

I get the error shown below (73TypeError) on a small background animation script when

  • 0

I get the error shown below (73TypeError) on a small background animation script when included in the header of a WordPress theme, which breaks the script. I don’t see any error when the script is included on non-Wordpress page:

enter image description here

Here is the script:

$(function() {
   $(".bottom").hover( function () {
      $(this).animate( {
         backgroundPosition : '0px 35px'}
      , 300); }
   , function () {
      $(this).animate( {
         backgroundPosition : '0px 0px'}
      , 600); }
   ); 
   }
);

Could someone advise at what is causing this error?

Thanks,

Nick

  • 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-05T22:22:49+00:00Added an answer on June 5, 2026 at 10:22 pm

    Fist off in wordpress, jQuery should be loaded with no-COnflict. So in this case your file should be;

    var $j = jQuery.noConflict();
    
    $j(function() {
       $j(".bottom").hover( function () {
          $j(this).animate( {
             backgroundPosition : '0px 35px'}
          , 300); }
       , function () {
          $j(this).animate( {
             backgroundPosition : '0px 0px'}
          , 600); }
       ); 
       }
    );
    

    and secondly, like undefined mentioned, you need to load your jQuery using wp-enqueue-script();

    To accomplish this, for best practices, place your jQuery on a separate file. call it for example bganimation.js

    now to load that js file in wordpress, use wp-enqueue-script(); like this.

    function this_is_jquery_example(){
    wp_enqueue_script( 'jquery' );;
    wp_enqueue_script('myscript', plugin_dir_url(__FILE__) .' bganimation.js');
    
    }
    add_action('wp_enqueue_scripts','this_is_jquery_example');
    

    hope this helps.

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

Sidebar

Related Questions

// When I Run The Following Two Lines, I Get The Error Shown Below
I get the error message shown below when I click the button: ($'#billing_button_addTime') billingController.dialogAddTime.dialog
I can't launch my program on Android, get the error shown below: eclipse version,
i Have an arguments like the one below which i pass to powershell script
I have built a simple registration form shown below and Iam trying to get
When I configure method security under Spring Security I get the error shown above
I have a create method as shown below, in which I want to (if
i have the list shown below with 2 layouts between which i switch: <s:List
When trying to get next activities it shows this error: This page contains the
Here is the error I get ArgumentError in External_articles#show Showing app/views/external_articles/show.html.erb where line #3

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.