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