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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:58:32+00:00 2026-05-16T10:58:32+00:00

<script type=text/javascript> $(document).ready(function() { //select all the a tag with name equal to modal

  • 0
            <script type="text/javascript">
        $(document).ready(function() {  

            //select all the a tag with name equal to modal
            $('a[rel=popup]').click(function(e) {
                //Cancel the link behavior
                e.preventDefault();

                //Get the A tag
                var id = $(this).attr('href');

                //Get the screen height and width
                var maskHeight = $(document).height();
                var maskWidth = $(window).width();

                //Set heigth and width to mask to fill up the whole screen
                $('#mask').css({'width':maskWidth,'height':maskHeight});

                //transition effect     
                $('#mask').fadeTo("slow",0);    

                //Get the window height and width
                var winH = $(window).height();
                var winW = $(window).width();

                //Set the popup window to center
            $(id).css('top', $(this).height() + $(this).offset().top + 5);

                //transition effect
                $(id).fadeIn(1000); 

            });

            //if close button is clicked
            $('.window .close').click(function (e) {
                //Cancel the link behavior
                e.preventDefault();

                $('#mask').hide();
                $('.window').hide();
            });     

            //if mask is clicked
            $('#mask').click(function () {
                $(this).hide();
                $('.window').hide();
            });         

        });
            </script>
</head><body>
      <div id="subNav">
        <div id="status">

            <a href="#loginPanel" rel="popup">Login</a>
            <div id="loginPanel" class="window">
              <a class="close" href="#close"></a>
              Login Form
            </div> 

            <a href="#registerPanel" rel="popup">Register</a>
            <div id="registerPanel" class="window">
            <a class="close" href=""></a>
              Register Form
            </div>

        </div>
      </div>

script above i put at header.php,

but nothing happend when i click the a tag from url/index.php(require header.php)

but work excellent when i surf url/header.php , how come?

i put the script in head

firefox Error console:

Error: $(“a[rel=popup]”) is null

Source File: http://localhost/

  • 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-16T10:58:33+00:00Added an answer on May 16, 2026 at 10:58 am

    You probably did something like that

    <html>
    <head>
    <?php require("header.php") ?>
    </head>
    <body>
    </body>
    

    You should put header in body section!

    <html>
    <head>
    </head>
    <body>
    <?php require("header.php") ?>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Edit: improved the solution by turning it into a command… May 16, 2026 at 1:54 pm
  • Editorial Team
    Editorial Team added an answer There is no formal model for Python's threading (hey, after… May 16, 2026 at 1:54 pm
  • Editorial Team
    Editorial Team added an answer You aren't calling unselect in context, so this doesn't mean… May 16, 2026 at 1:54 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Here is my jQuery code: <script type=text/javascript> //<!-- $(document).ready(function() { $('input[type=submit]').click(function() { $.ajax({ type:
I'm attempting to select all <script type=text/html> tags in a page. I use <script>
<html> <head> <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js></script> <script type=text/javascript> $(document).ready(function(){ $(.pane:even).addClass(alt); $(.pane .btn-delete).click(function(){ alert(This Row will
I'm having troubles with the following code: <link type=text/css href=http://jqueryui.com/latest/themes/base/jquery.ui.all.css rel=stylesheet /> <script type=text/javascript
I'm trying to select an select element by name I found this thread showing
I have the following code where the function codeaddress geocodes the text feild value
On my page I have a drop-down select box, with a default value of
I downloaded jquery effects example and all effects are appearing only onclick but i
I want to set div alignment to center using javascript. The reason using javascript
I have the following code which is loading an xml file to populate a

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.