[jQuery] Getting next element with exact class

[jQuery] Getting next element with exact class


I am posting my first thread here so I would like to say Hello first.
Now, here is the problem.
I have a table. Lets see the example.
<table>
<tr><td>1</td><td class="niceclass">1</td><td>1</td><td
class="niceclass">1</td></tr>
<tr><td>2</td><td class="niceclass">2</td><td>2</td><td
class="niceclass">2</td></tr>
<tr><td>3</td><td class="niceclass">3</td><td>3</td><td
class="niceclass">3</td></tr>
</table>
Some cells have also a class "niceclass" and I want that if I click on
any of these cells with this class to get the next cell with the same
class.
I tried something like this and many other ways, but no luck.
$(".niceclass").click(function() {
        $(".niceclass",this).next(".niceclass").css({"background":"red"});
})
Thanks for any hints.