jQuery(document).ready(function($) { $("[data-slider]") .each(function () { var input = $(this); $("") .addClass("output") .insertAfter($(this)); }) .bind("slider:ready slider:changed", function (event, data) { $(this) .nextAll(".output:first") .html(data.value.toFixed(2)); }); });