<a href="#" class="sort">Sort</a>
$(".sort").click(function (event) {
$(this).toggle(function() {
$(this).toggleClass("sortUp","sortDown");
}, function() {
$(this).toggleClass("sortDown","sortUp");
});
});
it works but I need to click once before it works.
so –
click (nothing happens), click (sortUP), click (sortDown)
I would like to remove first click.
Thank you community for the help !
if you dont’ want to begin with a sortUp or sortDown class, do this: