How do I close a dialog using jQuery?

前端 未结 5 1037
攒了一身酷
攒了一身酷 2021-02-02 11:09

I am using the code below to create a jQuery UI Dialog widget dynamically:

 $(function () {
        var Selector = $(\"a:contains(\'sometext\')\");
        $(Sel         


        
5条回答
  •  走了就别回头了
    2021-02-02 11:47

    You should probably not use ids for dynamically created content, as you could end up with more than one element with the same id - meaning that document.getElementById (which I assume sizzle uses for the #id selector) will only return the first (potentially non-visible) one.

提交回复
热议问题