Can't select element in DOM with jQuery -


i created page receives button page jquery ajax when click on button nothing happens. code:

$(function () {     //$("#menu ul li").click(function () { alert("ok"); });      $("a").button();      $("#menu ul li:nth-child(2)").click(function () {         $("#ajaxloader").fadein('slow');         $.ajax({             url: "createdatabase.htm",             type: "get",             datatype: "html",             success: function (data) {                 $("#ajaxloader").fadeout('slow');                 $("#sample").html("").append(data).css("textalign", "center").css("paddingtop","30px") ;                 $("a").button();             }         });     });      $("#sample input:submit").click(function () { alert("ok"); }); }); 

createdb page:

<a id="createdb">create database</a> 

i using jquery ui. code in snipt.org

try using live method in jquery api. thing following

$("#sample input:submit").live("click", function(){ alert("ok"); });     

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -