Jquery dialog only opening once

前端 未结 2 396
抹茶落季
抹茶落季 2021-01-07 14:45

All- I know this has been asked, but the previous solutions don\'t seem to apply to my situation.

I have a simple table with a number of records in each row, with th

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-07 15:27

    It seems most likely that the problem lies in the fact that the actual dialog div isn't actually being selected correctly. And that (as far as I'm understanding the situation) stems from a bigger problem of wrong requirements on your part.

    If you want to reference a specific div, then you should reference that specific div. Yet, I hear you saying you want to reference a specific div (which is literally the only div which is used as a dialog) at the same time that you say you're afraid to reference that div by an ID.

    Basically, if there is only one div that's used as the dialog, then accept that and just call that div a name:

    .

    myDiag = $('#dialog');
    

    This way there is no confusion on if you are selecting the correct div.

    However, if what I said is not an option for some reason, then you can set break points in firebug at the point where you assign myDiag so that you can see what myDiag actually is at execution time.

提交回复
热议问题