Change div text on click

Change div text on click

I have been trying to work out how to change the text inside the div when the button is clicked in the same fashion as the button text is responding. jsfiddle
I tried changing the if / else to act on the div rather than the button like so -

  1. if ($(".stileone").text() === 'Yellow Box') {
  2.          $(this).text('Red Box');
  3.     }
  4.     else {
  5.         $(this).text('Yellow Box');
  6.     }   

but it did not work. How might I change the text in both the button and the div on click please. Any clues would be appreciated thanks.

ps - I could get it to change the text inside the div when the onclick was acting on the div jsfiddle