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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:07:53+00:00 2026-06-03T16:07:53+00:00

I have an event on a page that I need to fire from a

  • 0

I have an event on a page that I need to fire from a Chrome Extension. I do not have access to modify the page’s JavaScript.

$(selector).live("click", fn);

I need to trigger this with native JS in my Chrome extension, like this:

selectorElement.click(); //doesn't work

Of course that above won’t work because the live function is being used. How can I trigger it though?

Thanks!

  • 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-03T16:07:55+00:00Added an answer on June 3, 2026 at 4:07 pm

    If you don’t have jQuery, you can fire DOM events using dispatchEvent:

    var selector = "#...";
    var elmList = document.querySelectorAll(selector);
    
    var evt = document.createEvent("MouseEvents");
    evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
    elm[0].dispatchEvent(evt);
    

    This code fires on the first element matching the selector, but it could be modified to loop over elmList if you needed to fire on several elements at once.

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

Sidebar

Related Questions

I am hooking the window.onbeforeunload event in an aspx page. I need that not
I have this exact issue ASP.net can’t update page from event handler and it's
I have a page that refreshes every 20 seconds and I need to know
I have an element on my page that I need to attach onclick and
I have a classic ASP page that when loaded does a JavaScript call to
I have a javascript function that is being called from an actionscript component with
I have a page that need to toggle the visibility of a div at
Is there an event that is triggered after all Page_Load events have completed? How
i have many events such as $('.hidefile').click(function (event) { On page load and on
I have a page which has many event handlers. The code now reached 1000+

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.