Created
April 7, 2013 19:02
-
-
Save mikeyakymenko/5331975 to your computer and use it in GitHub Desktop.
jQuery для смены нескольких классов по клику.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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