javascript - button onclick dialog table -
i have jquery script:
$(document).ready(function () { $( "#details" ).dialog({ autoopen: false, show: { effect: "slide", duration: 500 }, hide: { effect: "slide", duration: 500 } }); }); $(document).on('click' ,'.popup' , function() { $( "#details" ).dialog( "open"); });
i want appear table class details when <button class="popup" id="$row[0]">
clicked
this jquery script not working. first throught needed document.ready()
didn't help.
try this:
$(document).ready(function() { $('.popup').click(function () { $('.details').dialog('open'); // use instead; mentioned <div id="details"> in comment! $('#details').dialog('open'); }); });
since button class popup
use .
.
and $(document).ready(function () {
required when need load js in dom ready state.
Comments
Post a Comment