Toggle click
Toggle click
I tried to use toggle whenever someone click on the div. But nothing hapen then. Here is script I use:
- <script>
- $(document).ready(function() {
- $('#change').click(function() {
- $('#logo').animate({backgroundColor: '#feb20e'},100);
- $(this).animate({backgroundColor: '#eda710',borderRightColor: '#d3940b'},500);
- $(this).css({ 'background-image': 'url("Images/arrow-hover.png")' },"slow");
- $('#logo').css({ 'background-image': 'url("Images/test2.png")'},"slow");
- }, function() {
- $('#change').click(function() {
- $('#logo').animate({backgroundColor: '#32a095'},100);
- $(this).animate({backgroundColor: '#2e9389',borderRightColor: '#24746c'},500);
- $(this).css({ 'background-image': 'url("Images/arrow.png")' },"slow");
- $('#logo').css({ 'background-image': 'url("Images/test.png")'},"slow");
- });
- });
- </script>