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

Edited to clone()/remove() modal instead of append()/hide() #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Edited to clone()/remove() modal instead of append()/hide() #29

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 12, 2014

This can be an option, but I don't have time for that, sorry.
Emacs trimmed whitespace so diff seems messy.

@nickpiesco
Copy link

@k1-hedayati Just wanted to thank you for this.... I was running into the same issue you probably did, and your modified version works a treat!

@ghost
Copy link
Author

ghost commented Mar 17, 2014

Your welcome, but consider this that I'm not a JS programmer so my changes may be dirty or hacky and they need to be written with correct way :)

@dinbror
Copy link
Owner

dinbror commented Mar 17, 2014

Hey there.

I just need to understand the use case. When and why do you prefer to clone/remove instead of append/hide?

Thanks
Bjørn

@nickpiesco
Copy link

Ninja edit: I have a table of errors thrown by an application, and the last cell has my trigger link and a hidden div with the stack trace. I call the popup on the hidden div like this:

$('.open-popup').click(function() {
    $(this).siblings('.error-popup').bPopup();
});

.append() moves that content into the popup, breaking that sibling relationship – once I open and close the popup, I can't use the same trigger to open it again. Cloning the content into the popup div preserves that relationship, so I can open and close at will. It's kind of an edgy case, but that's what worked for me.

This is the only quibble I've had with what has been a very helpful plugin, though – I appreciate all your hard work!

@dinbror
Copy link
Owner

dinbror commented May 25, 2014

Have you tried setting the appending attribute to false?

@nickpiesco
Copy link

No, but the problem was solved and I've since moved on. :) I'm pretty sure I read through the API docs before realising what the exact issue was, so I probably didn't even think to re-check. Thanks for calling it out here, though, so anybody coming here from Google like I did can try that first without having to resort to hackery.

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

Successfully merging this pull request may close these issues.

2 participants