Guest User

Untitled

a guest
May 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <head>
  2. <script type="text/javascript">
  3. $(document).ready(function(){
  4.  
  5.  
  6. var display_table;
  7. var goto_bottom;
  8.  
  9. display_table = function(){
  10. $("#search_button").click(function() {
  11. var values = [];
  12. $("input:checkbox[name=category_search]:checked").each(function(){
  13. //values.push($(this).next("a").text());
  14. values.push($(this).val());
  15. alert(values.join());
  16. });
  17. });
  18. }
  19.  
  20. goto_bottom = function(){
  21. $("#search_button").click(function() {
  22. $("html, body").animate({ scrollTop: $(document).height() }, "slow");
  23. });​
  24. }
  25.  
  26. });
  27.  
  28.  
  29.  
  30. </script>
  31. </head>
  32.  
  33. <body>
  34. <div style="position:fixed; top:95px; right:50px;">
  35. <button class="btn btn-primary btn-fill" style="width:200px;" id="search_button" onclick="display_table() , goto_bottom()">
  36. <i class="fa fa-search"></i>search</button>
  37. </div>
  38. </body>
  39.  
  40. $(document).ready(function(){
  41. var display_table;
  42. var goto_bottom;
  43.  
  44. display_table = function(){
  45. $("#search_button").click(function() {
  46. $("#search_button").click(function() {
  47. var values = [];
  48. $("input:checkbox[name=category_search]:checked").each(function(){
  49. values.push($(this).val());
  50. alert(values.join());
  51. });
  52. });
  53. });
  54. }
  55.  
  56. goto_bottom = function(){
  57. $("#search_button").click(function() {
  58. $("html, body").animate({ scrollTop: $(document).height() },"slow");
  59. });​
  60. }
  61.  
  62. });
Add Comment
Please, Sign In to add comment