callback function > return string
Posted: Sat Jul 13, 2013 10:13 am
I would like to get the word 'test' from the callback function psCallback below.
alert(opt); is now displaying the word 'test'
What am I doing wrong?
alert(opt); is now displaying the word 'test'
What am I doing wrong?
Code: Select all
function psCallback() {
var content = 'test';
return content;
}
jQuery(document).ready(function () {
var opt = {callback: psCallback};
alert(opt);
return false;
});