Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
How to slowly show-hide with jquery prop

When I click the button, I want to hide that button and show the div. I want this to be slow.For this:

$('#add_note').on('click',function (){
        $(this).hide(200);
        $('#add_note_form').show(200);
    })

i used this. But, I want to make this using prop('hidden',true/false).

$('#add_note').on('click',function (){
        $(this).prop('hidden',true);
        $('#add_note_form').prop('hidden',false);
    })

It works like this but is it possible to do it slow?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can't animate a slow transition using the boolean hidden property.

However you can use fadeOut() instead, then set the property in the callback when the animation completes:

$('#add_note').on('click',function() {
  $(this).fadeOut(1000, function() {
    $(this).prop('hidden', true);
  });

  $('#add_note_form').fadeIn(1000);
})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!