<script type="text/javascript">
$(document).ready(function($) {
$("a.delete").click{function(){
$(this).parent().remove();
}
});
</script>
<li>
<a href="index.html">
<h3>1</h3>
</a>
<a href="javascript:void(0)" onclick = "" id = "我" class = "delete">删除关注</a>
</li>
but when i click that button ,”Uncaught SyntaxError: Unexpected token” appears in the console.How can I make it ,i’m very puzzled.if possible , I want some example code ,a lot of thanks
if you have a specific
<ul>to target, use it’s class name or ID to specifyDEMO