Reputation: 93
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>';
}
Upvotes: 0
Views: 36
Reputation: 644
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>');
}
Upvotes: 3