views:

36

answers:

1

I'm working on a JavaScript-based banner for a client and have hit a wall. The banner runs fine in Chrome, Firefox, IE7 and 8. Safari, however, allows the user to close the banner once and open it once, then it stops responding to clicks. The user should be able to open and close the banner as many times as they'd like.

Rather than cluttering this post with code snippets, an example of the banner can be found here: http://jsfiddle.net/M3EPK/2/embedded

I've commented out previous code that was attempted at one point.

Can anyone give me any explanation as to why it'd work in all of those browsers yet fail so miserably in Safari. All of the browsers are the latest versions (aside from IE so-to-speak).

A: 

Have you tried using .live() instead?

Metropolis
I have tried using .live(), but to no avail. .delegate() functions in a very similar fashion, and actually has a few advantages over .live() http://www.learningjquery.com/2010/03/using-delegate-and-undelegate-in-jquery-1-4-2
John
Yes it does....just checking if that is the problem....Hmmm.....Your code looks ok to me, but I guarantee you that its something in your code causing it. I had the same problem the other day. Try adding alerts to it and keep testing it in safari till you find where its stoping at.
Metropolis