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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:23:28+00:00 2026-06-14T16:23:28+00:00

I am trying the run the following code: $(document).ready({ $(#menu-nav a).hover( function () {

  • 0

I am trying the run the following code:

$(document).ready({

    $("#menu-nav a").hover(
         function () {
           $(this).css ( marginRight: '20px' );
         }, 
         function () {
            $(this).css ( marginRight: '10px' );
         }
     );



}); //end ready

But, my dreamweaver reports and error on the line $("#menu-nav a").hover(. Is it okay to use the selector as #menu-nav a or should it be something else ?

  • 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-14T16:23:30+00:00Added an answer on June 14, 2026 at 4:23 pm

    The problem is instead of this:

    $(document).ready({
    

    You need this:

    $(document).ready(function () {
    

    I am sure you knew that, but it’s easy to overlook since the error is shown to be in the following line.


    Another issue:

    I think you will also run into problems here:

     $(this).css ( marginRight: '20px' );
    

    Per the jQuery docs, you should use this:

     $(this).css ('margin-right', '20px');
    

    An alternative:

    Here’s one more thing, just to give a complete answer. As is noted in the comments, you really don’t need jQuery at all for this, if you don’t want to use it. Try this:

    #menu-nav a:hover { margin-right: 20px; }
    

    You can add whatever styles you want like that.

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

Sidebar

Related Questions

In the following jQuery code: $(document).ready(function(){ function parse(document){ $(document).find(entry).each(function(){ $(#items).append( '<h3><a href=#>'+$(this).find('title').text()+'</a></h3>'+ '<div> '+$(this).find('summary').text()+'</div>'
I'm following this post and trying to run the code (copied below), and I'm
when I trying to run following code. var result = from c in db.brand
I am trying to run the following code that I found marked as correct
I am trying to run the following code from within Eclipse: Process process =
I am trying to run the following code in assembly: mov %si, %ax mov
I'm trying to run the following code, but get an error in the gameLoop
I am trying to run the following code: List<Integer> list = Arrays.asList(1,2,3); ArrayList<Integer> val
I am trying to run the following simple code, public abstract class Shape{ abstract
I am trying to run the following code, taken from the Facebook developer site.

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.