I have this sample code. What I need is to run the function once on load and bind it to change event. The conditional run is required.
if (true) {
Settings.customImage();
}
Settings.customImage = function() {
var imageInput = $("#imageInput");
var imagePreview = $('#imagePreview');
updateCustomImage();
imageInput.bind('change', updateCustomImage());
function updateCustomImage() {
var src = imageInput.val();
alert(src);
imagePreview.html(src ? '<img src="' + src + '">' : '');
}
}
true. @pXL - If your edit had been a suggested edit in need of review it would've been rejected as "too minor", I mean, really was that exclamation mark such a problem?