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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -