Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better variable name in the docs #244

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ <h3>Default dialogs</h3>

<p><pre class="brush:javascript">
// confirm dialog
alertify.confirm("Message", function (e) {
if (e) {
alertify.confirm("Message", function (ok) {
if (ok) {
// user clicked "ok"
} else {
// user clicked "cancel"
Expand All @@ -167,9 +167,9 @@ <h3>Default dialogs</h3>

<p><pre class="brush:javascript">
// prompt dialog
alertify.prompt("Message", function (e, str) {
alertify.prompt("Message", function (ok, str) {
// str is the input text
if (e) {
if (ok) {
// user clicked "ok"
} else {
// user clicked "cancel"
Expand Down Expand Up @@ -370,8 +370,8 @@ <h2><span>custom themes</span></h2>

$("confirm").onclick = function () {
reset();
alertify.confirm("This is a confirm dialog", function (e) {
if (e) {
alertify.confirm("This is a confirm dialog", function (ok) {
if (ok) {
alertify.success("You've clicked OK");
} else {
alertify.error("You've clicked Cancel");
Expand All @@ -382,8 +382,8 @@ <h2><span>custom themes</span></h2>

$("prompt").onclick = function () {
reset();
alertify.prompt("This is a prompt dialog", function (e, str) {
if (e) {
alertify.prompt("This is a prompt dialog", function (ok, str) {
if (ok) {
alertify.success("You've clicked OK and typed: " + str);
} else {
alertify.error("You've clicked Cancel");
Expand Down Expand Up @@ -430,8 +430,8 @@ <h2><span>custom themes</span></h2>
$("labels").onclick = function () {
reset();
alertify.set({ labels: { ok: "Accept", cancel: "Deny" } });
alertify.confirm("Confirm dialog with custom button labels", function (e) {
if (e) {
alertify.confirm("Confirm dialog with custom button labels", function (ok) {
if (ok) {
alertify.success("You've clicked OK");
} else {
alertify.error("You've clicked Cancel");
Expand All @@ -443,8 +443,8 @@ <h2><span>custom themes</span></h2>
$("focus").onclick = function () {
reset();
alertify.set({ buttonFocus: "cancel" });
alertify.confirm("Confirm dialog with cancel button focused", function (e) {
if (e) {
alertify.confirm("Confirm dialog with cancel button focused", function (ok) {
if (ok) {
alertify.success("You've clicked OK");
} else {
alertify.error("You've clicked Cancel");
Expand All @@ -456,8 +456,8 @@ <h2><span>custom themes</span></h2>
$("order").onclick = function () {
reset();
alertify.set({ buttonReverse: true });
alertify.confirm("Confirm dialog with reversed button order", function (e) {
if (e) {
alertify.confirm("Confirm dialog with reversed button order", function (ok) {
if (ok) {
alertify.success("You've clicked OK");
} else {
alertify.error("You've clicked Cancel");
Expand All @@ -480,8 +480,8 @@ <h2><span>custom themes</span></h2>
$("bootstrap").onclick = function () {
reset();
$("toggleCSS").href = "assets/js/lib/alertify/alertify.bootstrap.css";
alertify.prompt("Prompt dialog with bootstrap theme", function (e) {
if (e) {
alertify.prompt("Prompt dialog with bootstrap theme", function (ok) {
if (ok) {
alertify.success("You've clicked OK");
} else {
alertify.error("You've clicked Cancel");
Expand Down