1
I have the following input:
When you click the change button a new input appears:
When you click this remove button, the first input appears again, only the button breaks the line and looks like this:
Here’s the script behind it:
<script>
$(document).ready(function(){
$("#edita,#remove").click(function(){
var id = $(this).attr('id');
if(id=='edita'){
$('#numero').css("display","none");
$('#edita').css("display","none");
$('#trocaNum').css("display","block");
}
if(id=='remove'){
$('#numero').css("display","block");
$('#edita').css("display","inline");
$('#trocaNum').css("display","none");
}
});
});
</script>
Suggestions ?
You can post HTML?
– Marconi
Swap $('#numero'). css("display","block"); for $('#numero'). css("display","");
– RBoschini
@Rboschini worked. If you want to reply to me to mark as solved. Alias this script is good? or I have to do something more optimized.
– Bia
@Bia already posted, thanks for the kindness.
– RBoschini