How to dynamically load content from an external url, inside of a jquery ui modal dialog widget?

前端 未结 2 1566
攒了一身酷
攒了一身酷 2020-12-31 17:59

I asked this question before, but I don\'t think I explained properly for what I am trying to accomplish.

There are multiple links on my website and I want to open

2条回答
  •  迷失自我
    2020-12-31 18:42

    You can't have multiple elements with the same Id. Change your links to to class="test" instead and therefore your click event to $('.test').click().

    Also if you still have problems, and I remember I had some similar issues because how JQUery Dialog behaves itself with the DOM. It will literally rip your #somediv out of content and append it to the bottom of a page to display that dialog. I solved my dynamic dialog loading issues with wrapping it in another div.

提交回复
热议问题