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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:57:01+00:00 2026-06-11T20:57:01+00:00

HTML <p id=para> This is a paragraph</p> JS/Jquery $(para).hover(function() {$(this).hide();}, function() {$(this).show();}); Now what

  • 0

HTML

<p id="para"> This is a paragraph</p>

JS/Jquery

$("para").hover(function() {$(this).hide();}, function() {$(this).show();}); 

Now what i am trying to is when mouse is over the paragraph, the element should hide and when mouse leaves the element is should be visible again. However neither the paragraph is hiding and hence not appearing back. What’s wrong here ?

  • 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-11T20:57:03+00:00Added an answer on June 11, 2026 at 8:57 pm

    You’re missing the # ID selector, having just “para” is looking for a tag <para> (which of course doesn’t exist in this case.

    $("#para")
    

    On a side note, you typically want to have some sort of div (of a set size let’s say) etc wrapped around a situation like this, and there is where the hover event is taken from, and the inner div shown. Makes it less “skippy”.

    Also if you do it with a div it can be done with CSS:

    div:hover #para { display:block; }
    

    jsFiddle CSS example

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

Sidebar

Related Questions

This code doesn't work as intended, what am I doing wrong? $(document).ready(function(){ $(a.hide-para).click(function(){ $('p').hide();
I have the following code: $.get(viewUrl + para, function (data) { dialogDiv.html(data); ... });
Given the following HTML fragment: <p id=para>hello &lt;world&gt;</p> The jQuery .text() and .html() methods
html() should be used for setting content in non-form elements such as div's. **
HTML <!doctype html> <html> <head> </head> <body> <button id=b1 type=button>Show Spoiler</button> <p id=p1 style=display:none>
html img returned from ajax has class of 'tocrop'. Currently I Calling the function
This simple JS can't set the value of para. I guess getElementByName doesn't work.
I'm trying to translate an online html page into text. I have a problem
I'm trying to change text-selection on my HTML page. I want to change the
I'm trying to learn XSLT (for some holiday coding fun). I think I now

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.