You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DispatchWeb/Content/Scripts/step_resize.js

11 lines
377 B
JavaScript

$("div.order_status").each(function (i, v) {
var statusObject = $(v);
var parentWidth = statusObject.parent().width();
var stepCount = statusObject.find("span.s-step").length;
var everyWidth = parentWidth / (stepCount + 1);
statusObject.css({
paddingLeft: everyWidth
});
statusObject.find("span.s-step p").css({ width: everyWidth });
});