Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. $(function two(){
  2.  
  3. $("#but_v").click(function () {
  4. var kon=$("#kon").prop("checked");
  5. var nac=$("#nach").prop("checked");
  6.  
  7. if(nac==true)
  8. {
  9. var text_n=$("#text").val();
  10. $("article ol").prepend("<li>"+text_n+"</li>");
  11. }
  12.  
  13. if(kon==true)
  14. {
  15. var text_k=$("#text").val();
  16. $("article ol").append("<li>"+text_k+"</li>");
  17. }
  18. });
  19.  
  20. });
  21.  
  22. $(function three(){
  23. $("body").append("<p>Test paragraf</p>");
  24. $(document).ready(function(){
  25. $("#btn_three").click(function(){
  26. $("p").clone().appendTo("#THEEND");
  27. });
  28. });
  29. });
  30.  
  31. $(function image(){
  32. $(document).ready(function(){
  33. $("#btn_image").click(function(){
  34. $("img").remove();
  35. });
  36. });
  37. });
  38.  
  39. $(function image_x_y(){
  40. $(document).ready(function(){
  41. $("#btn_x_y").click(function(){
  42. $("img").width(440-440*0.1);// 10%
  43. $("img").height(220-440*0.1);// 10%
  44. });
  45. });
  46. });
  47.  
  48. $(function tabl_input(){
  49. $('.table-filters input').on('input', function () {
  50. filterTable($(this).parents('table'));
  51. });
  52.  
  53. function filterTable($table) {
  54. var $filters = $table.find('.table-filters td');
  55. var $rows = $table.find('.table-data');
  56. $rows.each(function (rowIndex) {
  57. var valid = true;
  58. $(this).find('td').each(function (colIndex) {
  59. if ($filters.eq(colIndex).find('input').val()) {
  60. if ($(this).html().toLowerCase().indexOf(
  61. $filters.eq(colIndex).find('input').val().toLowerCase()) == -1) {
  62. valid = valid && false;
  63. }
  64. }
  65. });
  66. if (valid === true) {
  67. $(this).css('display', '');
  68. } else {
  69. $(this).css('display', 'none');
  70. }
  71. });
  72. }
  73. });
  74.  
  75. $(function animation(){
  76. $(document).ready(function(){
  77. $("#qwerty").click(function(){
  78. var img = $("img");
  79. img.animate({height: '300px', opacity: '0.4'}, "slow");
  80. img.animate({width: '300px', opacity: '0.8'}, "slow");
  81. img.animate({height: '150px', opacity: '0.4'}, "slow");
  82. img.animate({width: '150px', opacity: '0.8'}, "slow");
  83.  
  84. });
  85. });
  86. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement