jquery - attr not working in chrome, but working in IE -
below code, not working in chrome, working in ie. tried methods given in other threads, no use.
hence attaching full code further suggestions.
var changelink = $("<a />").text(res_buttonedit).click(function () { showpopupform(q, action); return false; }); var deletelink = $("<a />").text(res_buttonremove).click(function () { $(function () { if (confirmdeleteactiondialog.css("visibility") == "hidden") { confirmdeleteactiondialog.css("visibility", "visible"); } confirmdeleteactiondialog.dialog({ resizable: false, position: ["center", 150], width: 300, height: 160, modal: true, buttons: [ { text: res_buttonremove, click: function () { $(this).dialog("close"); deleteaction(q, form, action); } }, { text: res_popupcancel, click: function () { $(this).dialog("close"); } } ] }); }); return false; }); var loglink = $("<a />").text("log").click(function () { actionitemlogdialog.dialog("open"); displayactionitemlog(action); }); questioncontainercontent.append($("<td cid='11' />").append(changelink).append("<br />").append(deletelink).append("<br />").append(loglink)); if (!canedititemright) { changelink.attr("disabled", true); } if (!candeleteitemright) { deletelink.attr("disabled", true); } questioncontainercontent = null; });
please provide suggestions.
use .prop() instead:
$element.prop("disabled", true); $element.prop("disabled", false);
Comments
Post a Comment