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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:11:00+00:00 2026-06-15T16:11:00+00:00

Im using a custom js which ive coded in a fiddle, and im wanting

  • 0

Im using a custom js which ive coded in a fiddle, and im wanting to integrate it into my wordpress theme: I have used the register and enqueue scripts as below, and they appear to be loading correctly, however it is the custom.js that appears to be erroring.

Please can someone inform me if i have missed a tag or something as i am stuck. Below is my code:-

/My Functions File/

<?php
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
wp_deregister_script('jquery');
wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") ."://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);
wp_enqueue_script('jquery');

wp_register_script( 'jquery-ui', get_template_directory_uri().'/js/jquery-ui.min.js', array('jquery'), true );
wp_enqueue_script( 'jquery-ui' );

wp_register_script( 'custom', get_template_directory_uri().'/js/custom.js', array('jquery-ui'), true );
wp_enqueue_script( 'custom' );
}
?>

/My custom JS file*/

$(document).ready(function() {  
$("h1, h2").on('click', function (e) {
e.preventDefault();
$(this).effect( "bounce", { times : 2, direction : "down", distance : "3" }, 200)
});

Thankyou
Kirsty

  • 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-15T16:11:02+00:00Added an answer on June 15, 2026 at 4:11 pm

    You forgot to close your document.ready

    $(document).ready(function() {
        $("h1, h2").on('click', function(e) {
            e.preventDefault();
            $(this).effect("bounce", {
                times: 2,
                direction: "down",
                distance: "3"
            }, 200);
        });
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a custom JLayeredPane. I have several Shapes which needed to be drawn
I'm trying to build a menu using a UItableView with Custom cells which have
I have managed to create a custom action in C# using MakeSfxCA which is
I've got a wordpress/mysql set up using the 'custom post type' which currently holds
I have a custom viewmodel which serialized using a JsonResult. The ViewModel has some
I have a custom Qt widget which I used to display disassembly and I
Background have a custom UITableCellView in which I'm using a custom UITextField that I've
I have been working on a custom wordpress theme, this is part of a
I've just created a custom taglib which runs fine with Jetty. When using TomCat
I am streaming a MP3 over network using custom feeding code, not AVAudioPlayer (which

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.