html - Cannot open the same Jquery UI dialog using another DIV tag -
i've been trying find solution allow me open same dialog box when user doesn't have access particular site. able open first div assigned id to.
you can view live example of working code here: http://jsfiddle.net/jtgcf/216/
only first "open" button works second 1 doesn't.
example of html:
<div id="content"> <a href="#open" id="open">open dialog</a> </div> <div id="content"> <a href="#open" id="open">open dialog</a> </div> <div id="ok-dialog"> <p>it's ok!</p> </div>
the function:
$(function() { $('#open').click (function() { $('#ok-dialog').dialog ({ modal: true, title: 'ok!' }); }); });
id's supposed unique, used 1 element. jquery select first element given id. use class instead.
Comments
Post a Comment