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

Examples #35

Open
justthisguy opened this issue Sep 24, 2016 · 0 comments
Open

Examples #35

justthisguy opened this issue Sep 24, 2016 · 0 comments

Comments

@justthisguy
Copy link

It seems reasonable to guess that using this gem is better than just loading colorbox.js and using through javascript . . . but after a bunch of searching, I have not found any good examples of how one would use it in a Rails way especially usual things like having a partial rendered inside or a hidden div.

It took me a while, two new routes and a partial but I got it working. Still, I cannot believe that this is the way that you intended.

I am happy to build a nice example wiki page for this project and create a pull request. If needed, I will create a small example app. Please post examples here or email them to me and I will get it built.

  • This is the one I got working but needed an additional route:
    <%= link_to "Add something", new_something_path, data: { colorbox: true, inline: true } %>
  • If someone could example how to make this work, I would be most appreciative:
    <%= link_to "link name", '#', data: { colorbox: true, href: 'id-of-some-div', inline: true } %>
  • Examples of Photo and iFrame would be great as well.

Thank you!

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