1: $(document).ready(function() {
2: $('div').click(function() {
3: $(this).fadeOut('slow');
4: });
5: });$(document).ready(function() {
6: $('div').click(function() {
7: $(this).fadeOut('slow');
8: });
9: });
Use 'this' keyword to indicate the clicked element!
1: $(document).ready(function() {
2: $('div').click(function() {
3: $(this).fadeOut('slow');
4: });
5: });$(document).ready(function() {
6: $('div').click(function() {
7: $(this).fadeOut('slow');
8: });
9: });
No comments:
Post a Comment