开发者

ajax/jquery disables links after submit

i am working on this form. i am using lightbox and dhtml fade effects开发者_如何转开发. the content in my lightbox is a form. i am using jquery to validate the form. once the form is submitted, i redirect a user back to a thank you page. what i am noticing is that, once all the above events has taken place, i cannot click anywhere on my screen, all the links/buttons are sort of disable. i need to press F5 to refresh the page to be able to click anywhere on the page again?

is this happening because i am using jquery validation and an events already took place, how do i resolve this as i am a newbie to jquery. thanks


if you are using jquery to click on the links you likely are using this right now:

$("#yourdiv").click(function(){
    // your function here
});

when you update the content with javascript those links won't work anymore. for them to keep working you need to use the live function:

$('#yourdiv').live("click", function(){
    // your function here
});

I think this is your problem since I'm not completely sure what happens after you submit your form (maybe you left some details out)


Sounds a little bit like the lightbox popup hasn't closed properly, maybe the background that makes your popup modal isn't being removed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜