Reputation: 43
$('#home-btn').on('click', function(e) {
$('.settings-container').css('display', 'none');
$('.container').css('display', 'block');
$('.panel-heading').prepend(global_recipient);
});
So when i press the button (more than once), it will prepend over my panel heading of the container. I haven't figured out how to make it only prepend once so it doesn't overflow my heading. Any tips/help is much appreciated, thank you.
Upvotes: 4
Views: 56
Reputation: 8380
If you don't want to prepend you probably want to replace.
In that case I'd simply use:
$('.panel-heading').html(global_recipient);
Upvotes: 2