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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:12:58+00:00 2026-05-27T05:12:58+00:00

I have this and it works fine: $(document).ready( highlightTableRow ); but when I add

  • 0

I have this and it works fine:

$(document).ready(
    highlightTableRow
);

but when I add a second function (see below) the second doesn’t work.

$(document).ready(
    highlightTableRow,
    attachClickLinkHandlerForRowLink
);

What’s the correnct syntax for adding a second function to my ready function? Thanks.

edit: add syntax errors. (eclipse)

$(document).ready(
    highlightTableRow();  **// error:Syntax error, insert ")" to complete Arguments**
    attachClickHandlerForRowLink();  **//error: Missing semicolon**
); **// error: Syntax error on token ")", delete this token**


var originalRowBackground;

function highlightTableRow(){
    $('[class^="contentRow"]:has(a)').live('mouseenter', enterRowFunction).live('mouseleave', exitRowFunction);
}

function enterRowFunction(){
    originalRowBackground = $(this).css('background-color');
    $(this).css({'background-color': "#EFE3FF", 'cursor': 'pointer'});
}

function exitRowFunction(){
    $(this).css({'background-color': originalRowBackground, 'cursor': 'pointer'});
}

function attachClickHandlerForRowLink(){
    $('[class^="contentRow"]:has(a)').live('click', clickRowLink);
}

function clickRowLink(){
    window.location = $(this).find("a").attr("href");
}    **//error: Missing semicolon**
  • 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-27T05:12:58+00:00Added an answer on May 27, 2026 at 5:12 am

    you could do

    $(document).ready(function() {
        highlightTableRow();
        attachClickLinkHandlerForRowLink();
    });
    

    also you could change the $(document).ready() part into $(function() so you would get

    $(function() {
        highlightTableRow();
        attachClickLinkHandlerForRowLink();
    });
    

    does the same only shorter

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

Sidebar

Related Questions

I have this code, loading XML documents on mouseenter, which works in Firefox: $(document).ready(function()
I have this code below which works fine but seems unnecessary as it loops
I have a function i would like to run onChange. This works fine with
I have this HTML: <table class=altRowTable> <script type=text/javascript> $(document).ready(function() { $(table.altRow tr:odd).css(background-color, #DEDFDE); });
I have this code (found from another StackOverflow question: $(document).ready(function() { $.ajax({ url: soundfile.mp3,
In FireFox I have this jQuery at the end of the body: $(document).ready(function() {
I have this code below. It works fine in safari however in IE the
I have this: <script> $(document).ready(function() { $(a#a_test).fancybox({ titleShow : false, width: 400, height: 120,
I have: $(document).ready(function () { jQuery(function ($) { $(#ClientID).mask(999-999999999); } } Now this mask
I have $('#structure').html(html); This works fine in FireFox. IE 8 doesn't display the html.

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.