jquery .live() click multiple times

Posted by user355227 on Stack Overflow See other posts from Stack Overflow or by user355227
Published on 2010-06-01T09:22:01Z Indexed on 2010/06/01 9:23 UTC
Read the original article Hit count: 134

Filed under:
|

Hi,

I am trying to make a script that updates the captcha image, that is loaded through live() function... It works, but it only updates the image 1 time on firefox, 2 times on safari... How can I make this to work multiple times?

jquery 1.4.2

relevant part of code:

/* captcha image change */
var rand = Math.random();

$('a.captcha_refresh').live('click', function() {
    $('img.captcha').attr("src", 'captchashow.php?sid=' + rand);
}); 

thanks, brm

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ajax