I have this:
<div class="people">
<a class="deleteUser"> x </a> <a class="userLink"> John Malkovich </a> ,
<a class="deleteUser"> x </a> <a class="userLink"> Adrian Mutu </a>
</div>
On click upon “deleteUser” links I want to be able to :
-hide the same link
-remove the relative “userLink” link
-and only if there’s any coma after the “userLink” link trim it out (this is where i need an help!)
How do i check with jquery if there’s a coma after an element’s content?
thanks
Luca
Try this :
See jsFiddle