1

When the IFrame loads this code attaches 'click' event to 'a' tag.

            function AddEventListenerToFrame(iframe) 
            {
                var frame = $(iframe).get(0).contentDocument;
                $('a', frame).click(function (event) {
                    $(this).attr("target", "_blank");
                });
            }

This works fine. But when the user clicks on the rendered menu and new partial is rendered, the clicks does not work anymore.

So, the issue is : event does not work on the new elements.

How to attach the same event for new rendered content ??

Bob Swager
  • 884
  • 9
  • 25

0 Answers0