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

data-add-x data-add-anchor-x how to use #2

Open
YvonneD opened this issue May 5, 2017 · 3 comments
Open

data-add-x data-add-anchor-x how to use #2

YvonneD opened this issue May 5, 2017 · 3 comments

Comments

@YvonneD
Copy link

YvonneD commented May 5, 2017

I'm a newbie and wonder how to use the attribute data-add-x and data-add-anchor-x. Anyone can give me an example? Thanks.
And if anyone can explain how to apply all the methods in the document.

@bluefirex
Copy link
Member

When creating the modal div, just add data-add-x="5" to move the modal by 5 pixels to the right or data-add-y="-5" to move it 5 pixels to the left.

On your trigger you can use data-add-anchor-x="5" to move the arrow right by 5 pixels or data-add-anchor-x="-5" to move it left by 5 pixels.

You can of course use any number and the same goes for -y.

@YvonneD
Copy link
Author

YvonneD commented May 8, 2017

Thanks. I've tryied these atrributes. data-add-x works well.But data-add-anchor-x seems not work on my test. Could you please check out my codepen demo,Thanks.

See the Pen SweetDropdown.js---Versatile dropdowns for any occasion by Yifang Di (@diyifang) on CodePen.

@Mashiane
Copy link

Mashiane commented Mar 4, 2019

Question:

How can i use the same dropdown on different buttons and just change its contents and position?
Does this not have a detachAll method to remove on all components attached to it?

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

No branches or pull requests

3 participants