Guest User

Untitled

a guest
Jun 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. /* Reusable Effects */
  2. $('[id*=toggle-]').live('click',function() {
  3. var container = $(this).attr("id").replace("toggle-","");
  4. $('#'+container).toggle();
  5. return false;
  6. });
  7. $('[id*=slide-]').live('click',function() {
  8. var container = $(this).attr("id").replace("slide-","");
  9. $('#'+container).slideToggle();
  10. return false;
  11. });
  12. $('[id*=fade-]').live('click',function() {
  13. var container = $(this).attr("id").replace("fade-","");
  14. if ($('#'+container) .is(':hidden')) {
  15. $('#'+container).fadeIn();
  16. } else if ($('#'+container) .is(':visible')){
  17. $('#'+container).fadeOut();
  18. }
  19. return false;
  20. });
Add Comment
Please, Sign In to add comment