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
Post a Comment