+ if (preview.contents().length == 0) {
+ preview.oneTime(500, "loading", function () {
+ preview.addClass("loading");
+ });
+
+ preview.load(editor.attr("data-preview-url"), { text: editor.val() }, function () {
+ preview.stopTime("loading");
+ preview.removeClass("loading");
+ });
+ }
+