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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:08:48+00:00 2026-05-23T08:08:48+00:00

I am having some trouble in triggering a click event . I have html

  • 0

I am having some trouble in triggering a click event .

I have html something like this :

<div class="carousel-control" >
<a href='#' id="carousel_1">1</a>
<a href='#' id="carousel_2">2</a>
<a href='#' id="carousel_3">3</a>
<a href='#' id="carousel_4">4</a>
<a href='#' id="carousel_5">5</a> 
etc
</div>

Now Here is the JS

jQuery('.carousel-control a').bind('click', function() {
        alert("carousel cliced")
        return false;
      });

$('#nextimg').click(function() {

var car_index=2;
                $('#carousel_'+(car_index+1)).trigger('click');
alert("next image clicked");
               return false;
            });

Now when I manually click the href tag the alert(“carousel clicked”) appers,
but when I click the nextimg only next image alert appears not the carousel alert.

I tried using

 $('#carousel_2').trigger('click'); 
 $('#carousel_2').click();
 $('#carousel_2').triggerHandler('click');

There seems to be no error in the firebug too.

Can someone please help me out. 🙂
Thank you,

  • 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-23T08:08:48+00:00Added an answer on May 23, 2026 at 8:08 am

    using

     $('.carousel-control a').bind('click', function()
    

    instead of this

    jQuery('.carousel-control a').bind('click', function()
    

    Works well.

    But can anyone explain me why is it happening so ?

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

Sidebar

Related Questions

Im having some trouble writing a getstring function, this is what I have so
I having some trouble figuring this problem out where I have one button which
Having some trouble passing values from one class to another. I basically have a
I am having some trouble with the Google Maps API . I have an
I'm having some trouble getting log4net to work from ASP.NET 3.5. This is the
Having some trouble sending properly formatted HTML e-mail from a PHP script. I am
I'm having some trouble understanding the IF clause at the end of this function
I'm having some trouble with the following... I have a sfGuardUser table set up
I am having some trouble triggering the 32-bit python for my macports python2.7 calvins-MacBook
Having some trouble with this code. Trying to return a tuple of tuples (coordinates)

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.