1

I have a "link" you press, textfield comes up(toggle()) with a submit button. When you submit it, on success on my ajax I have:

$('#RespondMsg' + id).hide(); $("#response" + id).fadeOut('slow'); 

Now the "link" remains, if you want to do it again. But since I have this, hide() and fadeOut(), the fields wont appear again, how can I solve this?

I tried with a timeout

setTimeout(function(){ $('#RespondMsg' + id).show(); }, 1000); 

But yeah that just shows the field again after 1 second.

So I want it to hide on success, and then if you press on the "link", it should show the fields again (#respondmsg, #response)

This is my "link" how it looks like:

$('.reply').live('click', function () { $('#replyWall'+$(this).attr('data-id')).toggle(); document.getElementById('replyMsg'+$(this).attr('data-id')).focus(); }); 

1 Answer 1

1
$('.reply').live('click', function () { var id = $(this).attr('data-id'); $('#replyWall'+id).toggle(); $('#RespondMsg' + id).hide(); $("#response" + id).show(); $('replyMsg'+id).focus(); }); 
Sign up to request clarification or add additional context in comments.

2 Comments

How so? Javascript error? Not showing the element you want it to show?
Now when i press on the .reply the elements doesnt show (RespondMsg)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.