Slider as a pager

Slider as a pager

 
The following code below is refreshing the entire page which is resetting the slider back to default value.
I know which part of code is doing it and that is
$( 'body' ).innerHTML(msg);
 
The only issue is I am using ASP.NET MVC and it posts back the entire page
is there anyone out there that knows a way around this?
 
  1. $(

    function() {

    $(

    '#slider-range-min').slider({

    range:

    'min',

    min: 1,

    max: 5,

    slide:

    function(event, ui) {

    $(

    '#amount').val('Page: ' + ui.value);

    $.ajax({

    type:

    'POST',

    url:

    'SearchResults',

    data:

    'id='+ ui.value,

    success:

    function(msg) {

    $(

    'body').innerHTML(msg);

    }

    });

    }

    });

    $(

    '#amount').val('Page: ' + $('#slider-range-min').slider('value'));

    });