0

I want to show some html element from javascript in #muncul, but it's just error

Here's my code Are my code wrong? Sorry for my bad English

if(data.st == 0)
{
 $('#muncul').'<div class="ui info message uk-margin-small-bottom"><i class="close icon"></i><div class="header">'.html(data.msg).'</div></div>';
}

1 Answer 1

3

Try this code:

if(data.st == 0)
{
 $('#muncul').html('<div class="ui info message uk-margin-small-bottom"><i class="close icon"></i><div class="header">' + data.msg + '</div></div>');
}
Sign up to request clarification or add additional context in comments.

Comments

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.