Menu icon Foundation

My Posts

No Content

My Comments

Brian Tsai commented on Allen Petersen's post over 5 years

Same issue here. I've got a situation (should be pretty common) where i have a list of data-reveal-id links in a list when the page is rendered. When you click on a link, it properly posts an Ajax request to the server, which then updates the list in the ajax response (binding with the ajax:success event), but in the updated list, the data-reveal-id links no longer respond with Ajax, but straight HTML posts.

I've been searching on Google and StackOverflow for an hour but can't find any way to reinitialize the data-reveal-id links. Apparently the binding on the original links is no longer valid./

I've also tried:
* $(document).foundation();

Any help would be greatly appreciated.

Brian

Brian Tsai commented on Justin Burrow's post over 5 years

@Paul Todd,

i've been having problems where if the result of your ajax call renders a link which the programatically opens reveal, you are unable to click the close button or the backdrop to close the reveal dialog; you end up with an error

TypeError: settings is undefined
bg_clicked = $(e.target)[0] === $('.' + settings.bg_class)[0];

your fix works for me; have you issued a pull request yet?

Posts Followed

No Content

Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on Allen Petersen's post over 5 years

Same issue here. I've got a situation (should be pretty common) where i have a list of data-reveal-id links in a list when the page is rendered. When you click on a link, it properly posts an Ajax request to the server, which then updates the list in the ajax response (binding with the ajax:success event), but in the updated list, the data-reveal-id links no longer respond with Ajax, but straight HTML posts.

I've been searching on Google and StackOverflow for an hour but can't find any way to reinitialize the data-reveal-id links. Apparently the binding on the original links is no longer valid./

I've also tried:
* $(document).foundation();

Any help would be greatly appreciated.

Brian

You commented on Justin Burrow's post over 5 years

@Paul Todd,

i've been having problems where if the result of your ajax call renders a link which the programatically opens reveal, you are unable to click the close button or the backdrop to close the reveal dialog; you end up with an error

TypeError: settings is undefined
bg_clicked = $(e.target)[0] === $('.' + settings.bg_class)[0];

your fix works for me; have you issued a pull request yet?

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content