I have an ajax call for a progress bar for a file upload. This works fine. I tried to add a line to have bPopup open the image afterwards but I can't get it working.
This is my javascript:
ajax.addEventListener("load", completeHandler, false);
function completeHandler(e) {
var fileDest = e.target.responseText;
uploadedImg = new Image();
uploadedImg.src = fileDest;
_("uploadedImg").src=fileDest; // All above here works
$('uploadedImg').bPopup(); // This doesn't
_("progressBar").value = 0; // This also works
}
I get no errors from javascript in the console in chrome. I have jquery 1.4.2 and bpopup files correctly linked.
HTML:
<img id="uploadedImg" src=""> // 'display:none' in css file
I have followed instructions on this page http://dinbror.dk/blog/bPopup/#Usage and cannot see what I have done wrong.
OK, fixed it :)
<img>
in a divhttp://dinbror.dk/bpopup/assets/style.min.css
http://dinbror.dk/bpopup/assets/jquery.easing.1.3.js
$('uploadedImg').bPopup();