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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:38:12+00:00 2026-05-28T02:38:12+00:00

Jquery question So i got if condition, in this condition I make div visible

  • 0

Jquery question

So i got if condition, in this condition I make div visible and want other to hide in that time.

if(pass == '1') 
// show in msgOK-IDnumber
$("div#msgOK-" + id).delay(200).fadeIn(1500).delay(3000).fadeOut(1500);
// hide ul.star-rating
????????????????????????????????

html

<ul class="star-rating" id="{$ID}">
<li class="current-rating" style="width:10%;"></li>
<li><a href="#" class="one-star"></a></li>
<li><a href="#" class="two-stars"></a></li>
<li><a href="#" class="three-stars"></a></li>
<li><a href="#" class="four-stars"></a></li>
<li><a href="#" class="five-stars"></a></li>
</ul>

<div style="display:none;" id="msgOK-{$ID}">Sucessfull</div>

Then after delay, everything need to go back to first state.

  • 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-28T02:38:13+00:00Added an answer on May 28, 2026 at 2:38 am

    You have to use block of code using the { and }:

    if(pass == '1') {
        // show in msgOK-IDnumber
        $("div#msgOK-" + id).delay(200).fadeIn(1500).delay(3000).fadeOut(1500);
    
        // hide ul.star-rating
        $("ul .star-rating").fadeOut(1500);
    }
    

    Without wrapping it as block, you can execute only one command for if statement, that’s probably what you experienced.

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

Sidebar

Related Questions

Hopefully this is a pretty simple question! I've got the code working in jQuery
I got Jquery UI Datepicker that work well, but one important issue make me
i've got the following Problem / Question: I have HTML Code like this: <div
I recently asked this question and got back a great solution using jquery for
I got this example from a previous StackOverflow question Jquery onmouseover image size increase
I've got a question regarding jQuery, I want to remove the following from the
This is more of a conceptual question. After reading about Jquery Mobile, it got
I've got a (hopefully) quick question this time, although it's been troubling me for
I got another question regarding jQuery's architecture. $('div') constructs a new jQuery object: $('div')
I've got a question about CSS based popup windows, like those generated by jQuery

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.