Skip to content

Psiturk.preloadpages

Doug Markant edited this page Oct 18, 2013 · 3 revisions

psiturk.preloadPages(pagelist)

For each path in pagelist, this will request the html and store in the psiturk object. A given page can then be loaded later using psiturk.getPage(pagename).

Example:

// Preload a set of HTML files
psiturk.preLoadPages(['instructions.html', 'block1.html', 'block2.html'])

// Set the content of the body tag to one of the pages
$('body').html(psiturk.getPage('block1.html'))