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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:23:43+00:00 2026-05-25T12:23:43+00:00

I have written code which responds to an image begin clicked by auto clicking

  • 0

I have written code which responds to an image begin clicked by auto clicking a link in the navigation bar by the following code:

$('body.node-4 div#block-views-Poster-block_1 img.imagecache-Posters').addClass('manually-linking').click(
function(){
    //$('body.node-4 div#block-menu-primary-links ul li a.menu-224').css('color', 'red').trigger('click');
    $('body.node-4 div#block-menu-primary-links ul li a.menu-224').css('color', 'green').click();
}
);

In each case, .trigger('click') and .click(), I am applying color via CSS to the target link. When the image is clicked, the target link changes color but the navigation to the relevant page never happens.

What might I be doing wrong?

  • 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-25T12:23:44+00:00Added an answer on May 25, 2026 at 12:23 pm

    Wouldn’t it be easier to simply redirect to that URL, instead of actually triggering the click?

        $(".imagecache-Posters").click(function(){
          var url = $(".menu-224").attr("href");
          location.href = url;
       });
    

    I assume you are changing the colour of the link, merely to confirm that it targets properly (as it will of course be reset, when the page reloads).

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

Sidebar

Related Questions

I have written the following code which will does not work but the second
I have written the following code which works, but im wondering can I make
I have written following code which generates a browse and upload button.i want to
I have written a custom server control which (pseudo-code) looks like public class MyCustomCtrl
I have some code I've written in PHP for consuming our simple webservice, which
I have written code in Java to access web cam,and to save image... I
I am having a weird problem .. I have written a CUDA code which
I have written quite a bit of code which uses the Linq2Sql table relationships
I have written c# code which utilizes the HtmlAgilityPack library in order to scrape
I have written some code which passes values between java and c using jni.

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.