4
$('#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.

Anik Islam Abhi
  • 25,137
  • 8
  • 58
  • 80
heikaa
  • 43
  • 3

1 Answers1

2

If you don't want to prepend you probably want to replace.

In that case I'd simply use:

$('.panel-heading').html(global_recipient);
filype
  • 8,034
  • 10
  • 40
  • 66