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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:24:15+00:00 2026-05-28T03:24:15+00:00

Disclaimer: Ok I know that this is being discussed in the thread linked below,

  • 0

Disclaimer:
Ok I know that this is being discussed in the thread linked below, but it isn’t solving my problem.
How to make onclick automatically through onload function

Issue:
I want to include a ‘tweet’ button in an HTML email. Obviously since you cannot run js in most clients this isn’t feasible. My theoretical solution to have an image link that says tweet that opens a new window who’s sole purpose is to house and fire a jQuery click event on an actual tweet button.

I’m trying to use this bit of simple syntax to no avail:

$(document).ready(function() {
   $('#autoClick2').trigger("click");
});

with this <a id="autoClick2" href="mailto:nothing@nothing.com">ugh</a>

I also tried:

$(document).ready(function() {
   $('#autoClick2').click();
});`

No dice on either, anyone have an idea?

  • 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-28T03:24:16+00:00Added an answer on May 28, 2026 at 3:24 am

    That seems a roundabout way of accomplishing your task, which is, if I understood correctly, simply to tweet something. Why not simply make that in-email “Tweet this” image a link to Twitter’s share URL? Here’s a quick (and dirty) example using the URL from this question:

    <a href="http://twitter.com/share?url=http%3a%2f%2fstackoverflow.com%2fq%2f8826132%2f114900&amp;text=Using%20to%20jQuery%20to%20fire%20an%20anchor%20tag%20%27click%27%20on%20load">
    <img src="http://a4.twimg.com/images/favicon.ico" alt="Tweet this" />
    </a>
    

    Implemented:


    http://a4.twimg.com/images/favicon.ico Tweet this

    For a more refined example, see the “Build Your Own Tweet Button” section of Twitter’s development documentation.

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

Sidebar

Related Questions

I will preface this question with the disclaimer that I know there are many
Disclaimer: This is not actually a programming question, but I feel the audience on
Disclaimer: This is for a homework assignment, but the question is not regarding the
Disclaimer This is not strictly a programming question, but most programmers soon or later
The Disclaimer First of all, I know this question (or close variations) have been
Disclaimer : I already asked this question , but without the deployment requirement. I
I know that there is code like this: http://www.java2s.com/Code/Android/Security/RSAencryptdecryptfunctionRSAECBPKCS1Padding.htm /* Copyright (c) 2010, Sungjin
Disclaimer: I know this is a bad way to do things. It is the
Disclaimer: I have looked through this question and this question but they both got
This is an academical exercise (disclaimer). I'm building an application that will profit from

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.