Skip to content

Instantly share code, notes, and snippets.

@toobulkeh
Created March 2, 2014 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toobulkeh/9300261 to your computer and use it in GitHub Desktop.
Save toobulkeh/9300261 to your computer and use it in GitHub Desktop.
BlackPixel's ProcessDiagram Gist
processDiagram: function () {
if (e("#process-diagram").length > 0) {
e("a.num-block").click(function () {
e("ul.diagram.process").toggleClass("active");
e(this).parent().hasClass("out") ? e(this).parent().removeClass("out") : e(this).parent().hasClass("active") && setTimeout(function () {
e(this).parent().addClass("out")
}, 2e3)
});
e("#process-diagram").easytabs({
animate: !1,
collapsible: !0,
collapsedByDefault: !0,
updateHash: !1,
tabsClass: "hello-world",
containerClass: "executed"
});
var t = e("#process-diagram"),
n = t.data("easytabs").tabs,
r = e(".process-panel");
totalSize = r.length;
r.each(function (t) {
if (t != 0) {
prev = t - 1;
e(this).prepend("<a href='#' class='prev-tab' rel='" + prev + "'>Prev Page</a>")
} else e(this).prepend(""); if (t + 1 != totalSize) {
next = t + 1;
e(this).prepend("<a href='#' class='next-tab' rel='" + next + "'>Next Page</a>")
} else e(this).prepend("")
});
e(".next-tab, .prev-tab").click(function () {
var r = parseInt(e(this).attr("rel")),
i = n.children("a:eq(" + r + ")").attr("href");
t.easytabs("select", i);
return !1
})
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment