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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:42:36+00:00 2026-06-01T16:42:36+00:00

I want click on next li item from current active item. Which li is

  • 0

I want click on next li item from current active item. Which li is active, its a tag contain active class.

So first of all, I get active a tag and it’s parent li. Now I get index of li in ul . Then add 1 in its value and get next a tag and fire click event on it.

My code is working fine in IE and Firefox, but in Chrome I get following exception.

“Uncaught TypeError: Object #<an Object> has no method ‘click'”

please suggests me usable link or sample code or correction in my code.

My html code is :-

    <nav class="cycle-nav-container" role="navigation">         
   <ul class="list-b" id="cycle-1-nav">
            <li class="hitmo"><a href="http://hitmo-studio.com/#hitmo">Hitmo</a></li>
            <li class="fastpr"><a href="#" class="active">FastPr</a></li>
            <li class="thinkmedia"><a href="http://hitmo-studio.com/#thinkmedia">Thinkmedia</a></li>
            <li class="arkana"><a href="http://hitmo-studio.com/#arkana">Arkana</a></li>
            <li class="bioway"><a href="http://hitmo-studio.com/#bioway">Bioway</a></li>
            <li class="nana"><a href="http://hitmo-studio.com/#nana">Nanaform</a></li>
            <li class="akademia"><a href="http://hitmo-studio.com/#akademia">Social Media Academy</a></li>
        </ul>
  </nav>

My Javascript code is:-

  var navIndex = $('.cycle-nav-container .list-b .active').parent();
    var nextIndex = $("ul.list-b li").index(navIndex) + 1;
    var par = $("ul.list-b");
    if(nextIndex>=par[0].children.length)
    nextIndex=0;
    var nextElement = par[0].children[nextIndex];
    var navIndex12 = nextElement.children[0];
   navIndex12.click();
  • 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-01T16:42:37+00:00Added an answer on June 1, 2026 at 4:42 pm

    To invoke the click handler for a DOM element, IE defines a click method which basically fires the click event . Firefox implemented it from FF 5+.

    However Chrome still uses the standard W3C defined dispatchEvent for programatically firing the event.

    Or it could also be that the navindex12 object returned could be a DOMTextElement. Try alerting the navindex12.nodeType

    To conclude , you should try to gracefully check for browser and element constraints before calling the click method.

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

Sidebar

Related Questions

I want to change text from the textview when I was click the next
I want people to click on a link (generated from an asp:HyperlinkField) and have
I have a defined a click which works as desired in all except two.
I have some textboxes on a page and I want to click a link
I have a linkbutton in gridview and i want to click event on code
I have this. I want to click and transfer the clicked data to another
I have an application page. I want to click a button to pop out
I have two button name A, and B want to click them equal to
I want to stop click on any links until the page is loaded. Can
For each click I want to increase the font size. $('#fontplus').each(function('click') { var fs

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.