twitter bootstrap 3 - Modal: using modal within elements that were loaded via AJAX after document.load() -
what happened: have page user has click on button , selection displayed in modal. when clicked on ever wanted div element on page updated, via ajax, shows have selected , has option "view item".
i have defined "view item" should open modal view have information on item, , now, referring above paragraph, rather opening modal view user being transferred page?
question: walk around modal activated on elements loaded after document load stage?
example code: on initial load user presented following code, @ example item set prior load:
<div id="dynamic-area"> item 1 <a href="selection/view/1" data-tip="tooltip" data-placement="top" data-original-title="view" data-toggle="modal">view selection</a> </div> <input type="radio" name="selection" id="selection" value="" data-toggle="modal" data-remote="/selection/search/1" />change selection
when user have picked different item after clicking on "change selection" #dynamic-area updated data fetched via ajax on selected item.
so lets say, if user have picked item 3, have code below:
<div id="dynamic-area"> item 3 <a href="selection/view/3" data-tip="tooltip" data-placement="top" data-original-title="view" data-toggle="modal">view selection</a> </div> <input type="radio" name="selection" id="selection" value="" data-toggle="modal" data-remote="/selection/search/1" />change selection
now if user click on "view selection", user being page 'selection/view/3' when user should see modal.
after extending function action worked should
Comments
Post a Comment