(function (global) { var PrintViewModel, app = global.app = global.app || {}; PrintViewModel = kendo.data.ObservableObject.extend({ pgContent: "This is the page to print", onPrint: function () { var prntContent = $("#tabstrip-print p").html(); alert("Content to be printed. \n\n" + prntContent); // the below line is the printer plugin window.plugin.printer.print(prntContent); // empty the result from appending further //$("#contentToPrint").empty(); //alert(window.plugin); //$("#contentToPrint").append(prntContent); } }); app.printService = { viewModel: new PrintViewModel() }; })(window);