jQuery selection help
jQuery.subscribe('setIdComFamOnEditForm', function(event,ui) {
var idButton = ui.id;
var idComFam = jQuery("#" + idButton).name.split("-")[1];
$("#fo开发者_开发知识库rmFamigliare").attr('action', 'detraz_update');
$("#IdComFam").val(idComFam);
});
The above code does not find the jQuery("#" + idButton).
Where Am I wrong?
I'm not that familiar with subscribe but are you sure that ui.id is returning a value? Furthermore I don't think a jquery wrapped set has a name property. So I don't think jQuery("#" + idButton).name will work. If you want the name attribute you would need to use the attr() method.
精彩评论