Skip to content

Instantly share code, notes, and snippets.

@mikeyakymenko
Created April 7, 2013 19:02
Show Gist options
  • Save mikeyakymenko/5331975 to your computer and use it in GitHub Desktop.
Save mikeyakymenko/5331975 to your computer and use it in GitHub Desktop.
jQuery для смены нескольких классов по клику.
<script type="text/javascript">
$(function(){
$('.none, .up, .down').click(function() {
this.className = {
down : 'none', none: 'up', up: 'down'
}[this.className];
return false;
});
})
</script>
<div class="ex_sortlink">
<a href="" class="none">Цена</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment