Skip to content

dynamically inserted links #3

Description

@barmstrong

Just wanted to mention that I was having trouble getting facebox to work on links that were dynamically inserted with javascript.

So for example if I did:

page.insert_html :top, 'some-div', :partial => "new_link"

that link wouldn't work until I refreshed the page.

The solution was to call the watchClickEvents() again every time after I added new links, like this:

page.insert_html :top, 'some-div', :partial => "new_link"
page << "facebox.watchClickEvents();"

Hope it helps...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions