Skip to content

$.then()

Arthur Guiot edited this page Sep 9, 2017 · 1 revision

How does it works?

As promises, $.then() is to execute something when an operation is done.

⚠️ This function will only be useful in some cases where you can't use promises. But keep in mind that if you can use promises, do it.

How to use it?

Example

function toDo() {
	$.copy("Hello World!");
}

function done() {
	alert("Text copied");
}

$.then(toDo, done):
Clone this wiki locally