1

How can i reset a display:none and add some value here is the code

onclick="$('reason{$test->id}').css('display:block');
$('#reasonid{$test->id}').val(this.value);"

1 Answer 1

2
$("#reason{$test->id}")
    .css('display','block')
    .val(this.value);

Try that.

Sign up to request clarification or add additional context in comments.

3 Comments

I think you have an extra ')' at the end of your snippet.
how can i use this with the chaining method like $("#reason{$test->id}") .css('display','block')).('#gett{$test->id}').val(this.value);
@jessegavin - D'oh! you're right - fixed. @streetparade - you need to provide more detail, I don't understand what you're asking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.