Advertisement
Guest User

Untitled

a guest
Nov 29th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <a href="#" id="hideShow">My Title</a>
  2. <div id="message" style="visibility:hidden; border: 1px solid #777; width: 400px; padding: 1%;">
  3. Blah Blah Blah Blah
  4. </div>
  5.  
  6.  
  7. <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
  8. <script type="text/javascript">
  9.  
  10. $("#hide").toggle(
  11. function(){$("#message").show();},
  12. function(){$("#message").hide();},
  13. });
  14.  
  15. </script>
  16.  
  17. $("#hideShow").click(function(){
  18. $("#message").toggle();
  19. });
  20.  
  21. $("#hideShow").click(function() {
  22. $("#message").toggle();
  23. });
  24.  
  25. $(document).ready(function() {
  26. $("#message").show(4000);
  27. $("#message").hide(3000);
  28. });
  29.  
  30. $(function () {
  31. $("#hideShow").click(function () {
  32. $("#message").toggle();
  33. });
  34.  
  35. Try This:
  36.  
  37. <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
  38. <script type="text/javascript">
  39. $(document).ready(function() {
  40. $("#hide_show").click(function() {
  41. $("#message").toggle();
  42. });
  43. });
  44. </script>
  45.  
  46. <a href="#" id="hide_show" title="toggle(show/hide)">My Title</a>
  47. <div id="message" style=" display:none; border: 1px solid #777; width: 400px; padding: 1%;">
  48. Blah Blah Blah Blah
  49. </div>
  50.  
  51. <a href="#" id="hideShow">My Title</a>
  52. <div id="message" style="display:none; border: 1px solid #777; width: 400px; padding: 1%;">
  53. Blah Blah Blah Blah
  54. </div>
  55.  
  56. <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
  57. <script type="text/javascript">
  58. $(function(){
  59. $("a#hideShow").bind("click", function(){
  60. $("#message").toggle();
  61. });
  62. });
  63. </script>
  64.  
  65. $("#hideShow").click(function(){
  66. $("#message").toggle();
  67. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement