This is my first question. I have the following jquery code:
$(document).ready(function(){ $("a").click(function(){ $(this).parent("li").css({textDecoration: "line-through"}); return false; }); });
which works great. It hits the parent of any clicked anchor (in html there are many anchors and lists, not just one). But I want only this functionality, nothing more. Isn't it a surplus to include the entire jquery library?
Unfortunately, I do not know how I can work with javascript very well, can someone convert this for me? I will be grateful.
EDIT: Wow, I am amazed at the speed and quality of the answers! So first of all a big THANKS to all of you! I will either work on the jonathon solution (edit2: roland), or just turn on jquery. Thanks again!
javascript jquery
fractalbit
source share