I have items and buttons that are created dynamically and I want to show user what is happening by styling them with jquery (i am using AJAX). each item is like the following: \[code\]<li class="items"><div class="itemheading"><div class="controls"> <span class="votes">1</span> <form class="actions" method="POST"> <input type="submit" class="button plus" value="http://stackoverflow.com/questions/11541308/+1" data-plus="123"> </form> <form class="actions" method="POST"> <input type="submit" class="button minus" value="http://stackoverflow.com/questions/11541308/-1" data-minus="123"> </form> <form class="actions" method="POST"> <input type="submit" class="button delete" value="http://stackoverflow.com/questions/11541308/X" data-del="123"> </form></div><span class="title">Item title</span></div><span class="infotext">Item Description</span></li>\[/code\]When a button is clicked I want the style of the item to be updated. for instance if the +1 button is clicked the items border should fade in green then fade back to nothing in the space of a few seconds to show that, that item has been voted up.What I have thought of so far is the following: \[code\]$(".plus").live('click', function() { $(this).css("background", "#fff");\[/code\]This does not work though. I thought I could use \[code\]$(this)\[/code\] to reference the button that was clicked because I am using this already to get the data- tag value of the button:\[code\]var plus = $(this).data('plus');\[/code\]The other problem is that even if it did work it would style the buttons border and I need to somehow style the \[code\]<div class="itemheading">\[/code\]. I could just say style the .itemheading element but since I will have multiple items with that class I need to find another method. Perhaps there is a way to reference the parent of an element and then I could get the parent of that?Thanks. Any help is really appreciated.UPDATE: so people can see what worked heres the code.\[code\]$(".plus").live('click', function() { $(this).parents(".itemheading").css("background", "#000");});?\[/code\]