Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. $('.tabl').mouseover(function() {
  2. $('td').hover(function() {
  3. $(this).animate({opacity: 0}, 40, function() {
  4. $(this)
  5. .css({'background': '#000'})
  6. .animate({opacity: 1}, 'slow');
  7. });
  8. }, function() {
  9. $(this).animate({opacity: 0}, 40, function() {
  10. $(this)
  11. .css({'background': '#fff'})
  12. .animate({opacity: 1}, 200);
  13. });
  14. });
  15. });
  16.  
  17. $("#wrk").submit(function() {
  18. var form = document.forms[0];
  19. var name = form.name.value;
  20. var price = form.price.value;
  21. var tr = '<tr><td>'.concat(price, '</td><td>', name, '</td></tr>');
  22. form.reset();
  23. $('input[name="name"]').focus();
  24. if ( !($('.tabl').is(":visible")) ) {
  25. $('.tabl').show(600);
  26. };
  27. $('.tabl > table').append(tr);
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement