2
動態創建列表。現在我想得到93或94等將用於PHP功能。如何獲得href或祖父母的ID與jQuery的最後一部分?
例如我以兩種方式添加93,如下所示。在li class="93"
或href="http://127.0.0.1/ci_backendpro2/index.php/messages/admin/changestatus/93"
任何人都可以告訴我如何使用jquery得到這個數字嗎?
在此先感謝。
...
...
<li class="93">
<div class="listbox">
<span class="user"><strong>Administrator</strong></span>
<span class="date">2010-01-28 15:33:53</span>
<a href="http://127.0.0.1/ci_backendpro2/index.php/messages/admin/changestatus/93"
class="todo">to do</a><span class="msg">test</span></div></li>
...
我正在處理以下代碼。
//on todo event. this changes the status to compeleted
$(".todo").live('click', function(event){
event.preventDefault();
// alert("hei");
loading.fadeIn();
});
這是後續問題from here。但問題本身是不同的。
謝謝。第一個沒有工作。它給出了未定義的。但第二個人在+1之後加入)。 – shin 2010-01-28 16:34:17