Created
March 2, 2014 01:01
-
-
Save toobulkeh/9300261 to your computer and use it in GitHub Desktop.
BlackPixel's ProcessDiagram Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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