0
好吧,我有這個jQuery只有找到下一個元素
$('.make_request').ajaxForm(function() {
// $('.band_notice').show();
$(this).parents('.accordionContent').find('.band_notice').show();
});
我用這plugin
我需要找到類元素.band_notice是形式點擊
這裏我的html
<div class="accordionContent">
<form action="/make_requests" class="make_request" method="post"><div style="margin:0;padding:0;display:inline"></div> .......
.......
</tr>
<tr><td><input id="make_requests" name="commit" type="submit" value="Add to Set" /></td><td><span class="band_notice">Set Added</span></td></tr>
</form>
<div class="accordionContent">
<form action="/make_requests" class="make_request" method="post"><div style="margin:0;padding:0;display:inline"></div> .......
.......
</tr>
<tr><td><input id="make_requests" name="commit" type="submit" value="Add to Set" /></td><td><span class="band_notice">Set Added</span></td></tr>
</form>
由於某種原因,我的jquery有點偏離,這似乎是它應該要正確
$(this).parents('.accordionContent').find('.band_notice').show();
,實際上沒有工作.. 。不知道爲什麼不......這個插件可能會改變這個 – Trace 2010-10-21 02:12:53
我做了console.log(這個)並得到了Object {url =「/ make_requests」,更多...} – Trace 2010-10-21 02:14:06
@Matt - 啊,一秒鐘,檢查參數 – 2010-10-21 02:14:33