jQuery mobile multipage how to bind link to div element

jQuery mobile multipage how to bind link to div element

Hello, 

i´ve a maybe stupid question: 

I want write a click function which change the site to "#site2" when i click on a div.

Example:

  1.  $('#btn_xms').on('click', function () {
  2.                        window.location.href = '#site2'
  3.                     });
The url change but the content doesn't. 
Where is the bug?