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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:17:21+00:00 2026-06-06T01:17:21+00:00

Here is the DEMO HTML CODE as <div id=me></div> <a id=ok href=>OK</a> jquery code:

  • 0

Here is the DEMO
HTML CODE as

<div id="me"></div>

<a id="ok" href="">OK</a>

jquery code:

var tr = '';
for (var i = 0; i < 100; i++) {
    tr += '<tr><td>a' + i + '</td></tr>';
}
var table = '<table>';
table += tr;
table += '</table>';
$('#me').append(table);

$('td').each(function(index, value) {
    if ($(this).text() == 'a50') {
        $(this).addClass('yellow').attr('id', 'search');
    }
});    
$('#ok').attr('href','#search');
$('#ok').trigger('click');

TO DO: In a table in each td there is data.I am trying to search the data. if the search data is found,the td is added with attribute class as yellow and id as search.
I have an anchor tag. The anchor tag is to simulate: when it is clicked then the windows is to be scroll to that location.I also added internal link to anchor tag.

Now,the Anchor tag is to be click so that the page is navigate to href location

PROBLEM The page is not navigating to internal link. Is there any problem with anchor tag not triggering click? But is navigated when i click the anchor tag with mouse

  • 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-06T01:17:23+00:00Added an answer on June 6, 2026 at 1:17 am

    There is a difference between click and navigate..so when it is href in anchor tag, its more like navigating
    Try this fiddle

    var tr = '';
    for (var i = 0; i < 100; i++) {
        tr += '<tr><td>a' + i + '</td></tr>';
    }
    var table = '<table>';
    table += tr;
    table += '</table>';
    $('#me').append(table);
    
    $('td').each(function(index, value) {
        if ($(this).text() == 'a35') {
            $(this).addClass('yellow').attr('id', 'search');
        }
    });
    
    location.href='#search';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HTML code: div id=updatePanel>​ jQuery code: var data=[1, 2, 3, 4, 5, 6, 7,
first here is my html demo code <div class=wrapper> <div class=item></div> <div class=item></div> <div
Before I explain, here's the example HTML code : [ Demo on jsFiddle here.
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>
Please see the demo here: http://jsfiddle.net/Freewind/Vkp4U/ The html: <div class=outer> <div class=x>x</div> <div class=y>y</div>
How can I change this javascript code to JQuery. <script type=text/javascript> function addTextTag(text){ document.getElementById('text_tag_input').value
Here is my jplayer code <div id=player></div> Javascript: $(#player).jPlayer( { ready: function () {
I'm trying to build a simple grid of div s: ( live demo here
Here the total height of all <div> 's are 900 pixels, but the jQuery
Its my html code : <html> <head> <script type=text/javascript src=jquery.js></script> <script type=text/javascript src=jqueryui.js></script> <script>

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.