Closed ivayloc closed 11 years ago
I pushed an update that should allow you to do this: https://github.com/zurb/foundation/commit/711a594e3325dca941d9e865490c6870e8980c4a
$(document).ready(function() {
$(document).foundation().foundation('reveal', {
closeOnBackgroundClick: false
});
});
Let me know if this works.
We are having the same problem with the closeOnBackgroundClick: false not working with the latest commit. Other options can be set but this option closeOnBackgroundClick doesn't seem to work.
Is this in all browsers?
Yeah happens in all browsers.
I have same problem here with Foundation 3. data-closeonbackgroundclick is not working. Did you guys figrued how to fix?
Same problem here. I cannot set: $(document).foundation().foundation('reveal', { closeOnBackgroundClick: false });
I just pushed a fix for this, it will be released in 4.1.2, or you can patch Foundation with the current Reveal in the mean time.
Hey thanks!
I've been using Foundation for numerous projects - and been able to integrate it with Engaging Networks donation pages. The results have been awesome. https://hsi.netdonor.net/ea-action/action?ea.campaign.id=19536&ea.client.id=104
Thanks for the awesome work.
On 2013-04-10, at 12:49 PM, Jordan Humphreys notifications@github.com wrote:
I just pushed a fix for this, it will be released in 4.1.2, or you can patch Foundation with the current Reveal in the mean time.
— Reply to this email directly or view it on GitHub.
@grassriots Nice! Looks great. I always like to see how Foundation gets integrated.
This is HSI's first foray into mobile - so we're going to see if there is a verifiable increase in donations with this Form.
On 2013-04-10, at 1:14 PM, Jordan Humphreys notifications@github.com wrote:
@grassriots Nice! Looks great. I always like to see how Foundation gets integrated.
— Reply to this email directly or view it on GitHub.
Same issue... I was able to keep reveal from being dismissed on background click but while this keeps the popup in place the reveal-bg gets dismissed... balls!
$("#modal").foundation('reveal','open').on('opened', {closeOnBackgroundClick: false});
@andreortiz82
Did you try:
$(document)
.foundation()
.foundation('reveal', {closeOnBackgroundClick: false});
Same here but close event's doesn't work either.
Hey, @mrsweaters. You could post here the code snippet, or files that have been modified to make it work?
Thank you!
Are you using Foundation 4.1.2? The code I posted above works in that version.
Sorry, I originally had onBackgroundClick
, it is supposed to be closeOnBackgroundClick
. I've updated it.
I haven't made the upgrade fyet, and many of my projects are still in version 3. Is there a fix for version 3?
is it not possible to control closeOnBackgroundClick per instance? @mrsweaters solution work's but will set it globally. same problem with event handlers onClose onOpen ...
Reveal now supports data-options
on the modals thanks to this commit: https://github.com/zurb/foundation/commit/dab93b65dce948a2384cd4dcd3c0124e0a03a63d
You can now do something like this for individual modals:
<div id="firstModal" class="reveal-modal" data-options="closeOnBackgroundClick: false;">
<p>Modal content.</p>
<a class="close-reveal-modal">×</a>
</div>
This will be released in Foundation 4.1.3 and is now available in master if you want to patch your release.
For documentation purposes: within data-options one should use 'close_on_background_click' instead of the above proposed 'closeOnBackgroundClick'.
Hi, I try to set an option for Reveal but it doesn't work:
Could you tell me what I did wrong?