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

  • Home
  • SEARCH
  • 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 3856040
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:52:09+00:00 2026-05-19T17:52:09+00:00

I have two div : <div id=div1></div> <div id=div2></div> and i have the following

  • 0

I have two div :

<div id="div1"></div>
<div id="div2"></div>

and i have the following jquery for div1:

 $('#div1').click(function(e)
{
alert(e.pageX + ' ' + e.pageY);
});

.
Now, i want to trigger click eventhandler of div1 to execute on clcicking of div2.
For this i wrote:

$('div2').click(function(e)
{
$('#div1').trigger('click');
});

It’s working fine but the problem is i am not able to get e.pageX and e.pageY in the event handler of div1.
How to pass eventdata of div2 click event handler i.e e to div1 click event handler.
Please help.

  • 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-19T17:52:09+00:00Added an answer on May 19, 2026 at 5:52 pm

    Since the event you want to trigger is of the same type, you can pass the old event object right along:

    $('#div2').click(function (e) {
        $('#div1').trigger(e);
    });
    

    For events of a different type, you may create a custom event object:

    $('#div2').mouseenter(function (e) {
        var newE = jQuery.Event('click');
        newE.pageX = e.pageX;
        newE.pageY = e.pageY;
        $('#div1').trigger(newE);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two controls <div id=div1 class=ddd> For US </div> <div id=div2 class=ddd> For
I have two divs as shown below: <div id=div1> <p>something</p> <div><table><tr><td>Div1</td></tr></table></div> </div> <div id=div2>
I have two DIV's called DIV1 and DIV2 and DIV1 consists of dynamic content
I have two divs as follows: <div id='div1'> <p>Hello world!</p> </div> <div id='div2'> </div>
How to wrap one div around another? I have following two div ids: #course
Possible Duplicate: click link below a higher z-index div I have two divs, one
I have this jQuery script which make my two divs the same height: $(document).ready(function
$('#div1, #div2').click(function(){ //Code to execute onclick }); $('#div1, #div2').hover(function(){ $(this).animate({ 'filter':'alpha(opacity=100)', '-moz-opacity':'1', '-khtml-opacity':'1', 'opacity':
I have two inner divs which are nested inside a wrapper div. I want
I have two div's (side by side) inside a parent div, i want right

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.