vodkabears / Remodal

No longer actively maintained.
http://vodkabears.github.io/remodal/
MIT License
2.75k stars 771 forks source link

Options not working if called from instance #213

Closed richtestani closed 8 years ago

richtestani commented 8 years ago

I have remodal used quite a bit on a site I am building and in some cases allowing remodal to work automatically I use, in other cases where I want to trigger it on a condition I would generate an instance.

In cases where options are supplied as a data attribute, I notice the options not working. Specifically closing window : data-remodal-options="hashTracking: false, closeOnOutsideClick: false"

If remodal responds naturally the options seem to work.

spacedawwwg commented 8 years ago

I am having this same issue

richtestani commented 8 years ago

user: @rolivav in issue #214 pointed out that when you create an instance, you can pass it options:

var modalSms = this.$('[data-remodal-id=modalSms]').remodal({ 'hashTracking': false, 'closeOnOutsideClick': false }); modalSms.open();

greyvugrin commented 8 years ago

Note for others running into same issue: your markup must not have the remodal class on it to begin with. If it does the options will not apply!