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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:31:16+00:00 2026-06-14T21:31:16+00:00

I have experimented with jQuery a while ago and it worked kinda neat. Now

  • 0

I have experimented with jQuery a while ago and it worked kinda neat. Now I created a site in php, with included header, footer, sidebar, you name it.

However, the jQuery doesn’t seem to work AT ALL. I linked to the jquery file which I downloaded to my hard drive. I’m currently running this site on localhost (xampp).

Since none of the jQuery code is working (and I’m trying really basic stuff like a click handler to pop up an alert – just to make sure jQuery works) I was wondering if the DOM gets processed first and then the included PHP files.

Any help is appreciated, I just want some simple jQuery running on the site.

Thanks

EDIT: sample code

     $('document').ready(function() {

$("#header-photo").click(function() {
  alert("Handler for .click() called.");
});



 });

Linking the jQuery file:

<script src="jquery.js"></script>

It’s in the same folder.

  • 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-14T21:31:18+00:00Added an answer on June 14, 2026 at 9:31 pm

    try to use it this way:

    first ref to the jquery plugin:

    <script src='path of your jquery plugin' type='text/javascript'></script>
    
    <script type='text/javascript'>
        $(document).ready(function() {
      //  ^------^-------------------I think this is your problem 
      //  just remove the quotes " '  "
    
            $("#header-photo").click(function() {
                alert("Handler for .click() called.");
            });
        });
    </script>
    

    try this and see if this works.

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

Sidebar

Related Questions

I have created a dynamic dependent menu using a jquery script i found on
so i have created !a simple popup using css and jquery. the problem is,
I have experimented with the datepicker in the jQuery UI and can get it
I have a jQuery Datatable with 3 headers. One header contains two radio buttons,
I have a jQuery UI Button that I'm placing in a jqGrid toolbar but
is there anyone who have experienced problems using the latests jQuery version with one
I have built an app using jQuery mobile. Apart of some compatibility issues across
I want to highlight a table row by changing its color, using jQuery. Have
I have a nice looking slideup/slidedown jquery form on my website. It sends the
I have created the layout for my new portfolio webpage here: http://vitaminjdesign.com/work.html I want

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.