after some hours spent to test all variations found on the web about this issue, i ended up with following solution, maybe this helps some other people to spare time:
Final working fiddle: http://jsfiddle.net/CT7fy/
The question was about how to integrate knockout.js and the JQuery Mobile slider with multipage navigation, which, i think, will be one of the most common situation.
So i'm sorry that i cannot consider Varun's answer as complete and satisfiyng, but i must say, without Varun's custom bindinghandler i would have never found a working solution.
Here is the custom binding handler, slighlty modified:
/* custom binding handler thanks to Varun http://stackoverflow.com/a/16493161/2308978 */
ko.bindingHandlers.slider = {
init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
var value = valueAccessor();
$(document).on({
"mouseup touchend keypress": function (elem) {
var sliderVal = $('#' + element.id).val();
value(sliderVal);
}
}, ".ui-slider");
}
};
...and here is the page initialization:
$(document).on('pagebeforeshow', '#slider-page', function(){
$('#quantity-slider').val(viewModel.quantity());
$('#quantity-slider').slider('refresh');
});
The text-part of the slider is also synchronized, after you pres enter or tab, as this is the standard slider behavior.