-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Adding additional data-* attributes break popover #856
Comments
I miss the good old days when people were writing HTML by hand. |
There's always pure PHP if you wanna time travel :P |
@pokonski wow, long time since i have seen the obligatory bashing of php from a rails (not ruby) developer |
I'm already travelling :D |
@henrikbjorn obviously it was a joke ;) Of course you have to write your own HTML in Sinatra etc. |
closing because this isn't actually an issue - although helpful :) |
no problem. Just thought it would be helpful when someone is Googling this (or similar) error in the future :) |
Is a bug fixed in current release? |
That solved for my problem. Thank you! |
If I add more
data-*
attributes (mainlydata-method
) to a link/button, the popover never loads. This is a problem because Rails will adddata-*
attributes for certain helpers...Update
After I looked into the issue a little more, I realized that Rails adds another
rel
attribute. The issue was actually the jQuery selector (I was only matching entirely instead of partially on therel
attribute). However, I feel like someone could easily run into this issue, so I'm going to leave the issue up.Essentially if you have something like the following in Rails:
Rails will automatically add
nofollow
to yourrel
tag, which is okay and makes sense. However, if your jQuery selector for popover/twipsy is like the one in the documentation:This will fail, because that jQuery selector matches the entire
rel
attribute. Instead, you should use*=
as your selector:The text was updated successfully, but these errors were encountered: