senchalabs/jQTouch — pull request #406 by dhull (2012-04-04 23:36:37+00:00)
Title: Add toPage argument to jQTouch.goBack()

The jQTouch documentation at https://github.com/senchalabs/jQTouch/wiki/Public-Object says that the goBack function takes an optional argument that allows the caller to specify what page to go back to, but that argument doesn't actually exist. This commit adds the code so that goBack works as documented.

goBack( to:object )

Forces jQTouch to go back to a certain page in the history. You can
pass a specific page ID, a number of pages to go back, or nothing to
go back one page. If the specified page can not be found, jQTouch will
go back one page by default. Example:

jQT.goBack(2); // Goes back 2 pages in history
jQT.goBack('#home'); // Goes to #home as long as it's in history
jQT.goBack(); // Goes back 1 page in history