$(document).ready(function(){ $('.extlinks a').filter(function(){ return this.hostname && this.hostname !== location.hostname; }).after(' external link'); }); $(function(){ $('a[href*=#]').click(function(){ if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetOffset = $target.offset().top; $('html,body').animate({ scrollTop: targetOffset }, 1000); return false } } }) }); $(document).ready(function () { $('li.tentang').click(function () { $('#apa').slideToggle('medium'); }); }); $(document).ready(function() { //Get all the LI from the #tabMenu UL $('#tabMenu > li').click(function(){ //perform the actions when it's not selected if (!$(this).hasClass('selected')) { //remove the selected class from all LI $('#tabMenu > li').removeClass('selected'); //Reassign the LI $(this).addClass('selected'); //Hide all the DIV in .boxBody $('.boxBody div').slideUp('1500'); //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important. $('.boxBody div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500'); } }).mouseover(function() { //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest $(this).addClass('mouseover'); $(this).removeClass('mouseout'); }).mouseout(function() { //Add and remove class $(this).addClass('mouseout'); $(this).removeClass('mouseover'); }); //Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list. $('#.boxBody li').click(function(){ window.location = $(this).children().attr('href'); }).mouseover(function() { $(this).css('backgroundColor','transparent'); }).mouseout(function() { $(this).css('backgroundColor',''); }); }); $('.ppt li:gt(0)').hide(); $('.ppt li:last').addClass('last'); $('.ppt li:first').addClass('first'); $('#play').hide(); var cur = $('.ppt li:first'); var interval; $('#fwd').click(function(){ goFwd(); showPause(); }); $('#back').click(function(){ goBack(); showPause(); }); $('#stop').click(function(){ stop(); showPlay(); }); $('#play').click(function(){ start(); showPause(); }); function goFwd(){ stop(); forward(); start(); } function goBack(){ stop(); back(); start(); } function back(){ cur.fadeOut(1000); if (cur.attr('class') == 'first') cur = $('.ppt li:last'); else cur = cur.prev(); cur.fadeIn(1000); } function forward(){ cur.fadeOut(1000); if (cur.attr('class') == 'last') cur = $('.ppt li:first'); else cur = cur.next(); cur.fadeIn(1000); } function showPause(){ $('#play').hide(); $('#stop').show(); } function showPlay(){ $('#stop').hide(); $('#play').show(); } function start(){ interval = setInterval("forward()", 5000); } function stop(){ clearInterval(interval); } $(function(){ start(); });