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

inputs encapsulated in divs #1

Open
eek opened this issue Jun 27, 2013 · 1 comment
Open

inputs encapsulated in divs #1

eek opened this issue Jun 27, 2013 · 1 comment

Comments

@eek
Copy link

eek commented Jun 27, 2013

Hi, got a problem :)

Tried to implement it, but my design forces me to use divs to encapsulate some of the inputs / options. The problem is that the overlay will not work if another parent exists - mainly because it will not show eg, the css selector ~ works for selectors within same parents, and selecting a parent is only available in CSS4.

So in _open and _close

I have added after
this.fld.className += ' nl-field-open';
this.fld.parentNode.className += ' nl-overlay-open'; so that I can make the css work for the overlay.

Also on _close

this.fld.className = this.fld.className.replace(/\b nl-field-open\b/,''); this.fld.parentNode.className = this.fld.className.replace(/\b nl-overlay-open\b/,'');

Now it works, but I still have a problem, that when I click the overlay to close it, my other classes on the encapsulated divs are deleted.
Tried to change ALL the className with replace before and += after, still not working.

Any ideas? :)

@eek
Copy link
Author

eek commented Jun 27, 2013

Made a quick fix for the moment, adding the nl-overlay-open to the next parentNode, and adding a div with no classes, so it won't be a problem for me.

Also changed the overlay div css to

.nl-overlay-open .nl-overlay { opacity: 1; visibility: visible; -webkit-transition-delay: 0s; -moz-transition-delay: 0s; transition-delay: 0s; }

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