Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind vs. live #4

Open
KDCinfo opened this issue Jul 11, 2011 · 2 comments
Open

bind vs. live #4

KDCinfo opened this issue Jul 11, 2011 · 2 comments

Comments

@KDCinfo
Copy link

KDCinfo commented Jul 11, 2011

Hi there,

I'm not sure if bind vs. live is my problem or not, but it would seem to be.

And btw, I'm using the "click" version of the source code.

I have a page that loads a shadowBox pop-up, and when it closes, I have it do a .load('filename.jsp') into a div. However, when the shadowBox closes and the div is reloaded with the .jsp, the tooltips aren't popping up (just in this section). Other tooltips do still pop up outside of the reloaded div section.

I was thinking it's because the code is doing a .click(), which is basically a bind. So I changed both .click() with .live('click', ...

Changing them both doesn't work at all (even if I don't reload the div). Changing the first .click() works when I don't reload the div section, but again still doesn't work if I do reload the div.

I also tried moving where the .load(), (where the div is being reloaded), but there are only so many places to put that after the shadowBox closes.

I understand it may have to do with some other part of all my code, but figured I'd start here to see if anyone had any thoughts on the bind vs live aspect of this?

Thanks.

Keith D Commiskey
http://kdcinfo.com

@KDCinfo
Copy link
Author

KDCinfo commented Jul 12, 2011

I figured this out. For any page I'm reloading into a DIV, if the Tips no longer work for the page being reloaded, I unbind and reconnect the element to ezpz.

$('.tooltip-target').unbind('click'); // Need to unbind
$('.tooltip-target').ezpz_tooltip({ // Reestablish original binding
contentPosition: 'aboveStatic',
stayOnContent: true,
offset: 10,
showContent: function(content) { content.fadeIn('slow'); },
hideContent: function(content) { content.stop(true, true).fadeOut('slow'); }
});

@KDCinfo KDCinfo closed this as completed Jul 12, 2011
@KDCinfo KDCinfo reopened this Jul 12, 2011
@KDCinfo
Copy link
Author

KDCinfo commented Jul 12, 2011

Well, that doesn't seem to work with IE :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant