Thanks a lot Benjamin. I've posted the issue in a separate thread.
On 29 sep, 16:45, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Not sure if I would be able to explain it well, but basically it is
> preloading the image and once it is loaded (onload) execute the code, it is
> similar to a ca
Not sure if I would be able to explain it well, but basically it is
preloading the image and once it is loaded (onload) execute the code, it is
similar to a callback function in jquery.
as for the safari issue, not sure, but I believe there was talk about that
issue in safari, do a search in the g
btw, it works fine (after adding the json.picture to the last link as
well:
img.src = "../layout/images/uploads/"+json.image;)
any idea why the animation results in no picture being show in Safari
(both mac and windows)?
it shows the loading gif, then the old image fades out, the new one
fades in
Thanks for the reply.
What exactly is happening with this new Image() thing?
On 29 sep, 02:50, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Do something like:
>
> function showNewPic(json) {
> var img = new Image();
>
> img.onload = function(){
> $('.jq_loading').hide();
> $('.currentpic')
Do something like:
function showNewPic(json) {
var img = new Image();
img.onload = function(){
$('.jq_loading').hide();
$('.currentpic').fadeOut("fast",function() {
$('.currentpic').attr({ src:
"../layout/images/uploads/"+json.picture}).fadeIn("fast")
});
};
img.src = "../layout/images/uploads/";
5 matches
Mail list logo