【发布时间】:2009-10-21 19:16:42
【问题描述】:
对 jQuery 来说有点新,所以请原谅尝试正确识别事物。
我需要一个元素的 id 反映在一个包含几个函数深度的选择器中,但我不太确定如何去做。
$("input[type='file'][id^='pic_']").change( //I need this element's id...
function()
{
$("."+this.id).hide("fast",
function()
{
//..to be reflected in this class selector
$("."+this.id).attr("checked", true);
}
);
}
);
提前感谢您的帮助。 :-)
【问题讨论】:
标签: jquery function css-selectors