Advertisement
Shadow1160

init.js

Mar 23rd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. $(document).ready(function() {
  2.  
  3. $('.tips').tipsy({gravity: 's'});
  4.  
  5. $(".banner").fitVids();
  6.  
  7. $('#news-ticker').innerfade({
  8. animationtype: 'slide',
  9. speed: 'slow',
  10. timeout: 6000,
  11. type: 'random_start'
  12. });
  13.  
  14. $('#motivasi').innerfade({
  15. animationtype: 'slide',
  16. speed: 'slow',
  17. timeout: 6000,
  18. type: 'random_start'
  19. });
  20.  
  21. $("a[rel^='prettyPhoto']").prettyPhoto();
  22.  
  23. setInterval('currentTime()', 1000);
  24.  
  25. $('ul.tree-menu').superfish();
  26. $(window).load(function(){
  27. $('.carousel').flexslider({
  28. animation: "slide",
  29. controlNav: false,
  30. animationLoop: true,
  31. slideshow: true,
  32. itemWidth: 144,
  33. });
  34.  
  35. $('#slider').flexslider({
  36. animation: "slide",
  37. controlNav: false,
  38. animationLoop: true,
  39. slideshow: true,
  40. });
  41. });
  42.  
  43. $('.tabs a').click(function(){
  44. switch_tabs($(this));
  45. });
  46. switch_tabs($('.defaulttab'));
  47. function switch_tabs(obj) {
  48. $('.tab-content').hide();
  49. $('.tabs a').removeClass("selected");
  50. var id = obj.attr("rel");
  51. $('#'+id).fadeIn(500);
  52. obj.addClass("selected");
  53. }
  54.  
  55. if ( $( '.shortcode-toggle').length ) {
  56.  
  57. $( '.shortcode-toggle').each( function () {
  58.  
  59. var toggleObj = $(this);
  60.  
  61. toggleObj.closedText = toggleObj.find( 'input[name="title_closed"]').attr( 'value' );
  62. toggleObj.openText = toggleObj.find( 'input[name="title_open"]').attr( 'value' );
  63.  
  64. toggleObj.find( 'input[name="title_closed"]').remove();
  65. toggleObj.find( 'input[name="title_open"]').remove();
  66.  
  67. toggleObj.find( 'h4.toggle-trigger a').click( function () {
  68.  
  69. toggleObj.find( '.toggle-content').animate({ opacity: 'toggle', height: 'toggle' }, 300);
  70. toggleObj.toggleClass( 'open' ).toggleClass( 'closed' );
  71.  
  72. if ( toggleObj.hasClass( 'open') ) {
  73.  
  74. $(this).text(toggleObj.openText);
  75.  
  76. } // End IF Statement
  77.  
  78. if ( toggleObj.hasClass( 'closed') ) {
  79.  
  80. $(this).text(toggleObj.closedText);
  81.  
  82. } // End IF Statement
  83.  
  84. return false;
  85.  
  86. });
  87.  
  88. });
  89.  
  90. } // End IF Statement
  91.  
  92. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement