Guest User

My File

a guest
Feb 8th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function($) {
  2.     "use strict";
  3.  
  4.  
  5. // for banner height js
  6. var windowWidth = $(window).width();
  7.     var windowHeight =$(window).height();
  8.     $('.banner').css({'height':windowHeight -"60" });
  9.    
  10.  
  11.  
  12. // for portfoli filter jquary
  13. $(window).load(function(){
  14.     var $container = $('.portfolioContainer');
  15.     $container.isotope({
  16.         filter: '*',
  17.         animationOptions: {
  18.             duration: 750,
  19.             easing: 'linear',
  20.             queue: false
  21.         }
  22.     });
  23.  
  24.     $('.portfolioFilter a').click(function(){
  25.         $('.portfolioFilter .current').removeClass('current');
  26.         $(this).addClass('current');
  27.  
  28.         var selector = $(this).attr('data-filter');
  29.         $container.isotope({
  30.             filter: selector,
  31.             animationOptions: {
  32.                 duration: 750,
  33.                 easing: 'linear',
  34.                 queue: false
  35.             }
  36.          });
  37.          return false;
  38.     });
  39. });
  40.  
  41.  
  42.  
  43.  
  44. // for portfolio lightbox jquery
  45. jQuery(function($) {
  46.     var $chosenSheet,
  47.     $stylesheets = $( "a[id^=theme-]" );
  48.    
  49.     // run rlightbox
  50.     $( ".lb" ).rlightbox();
  51.     $( ".lb_title-overwritten" ).rlightbox({overwriteTitle: true});
  52. });
  53.  
  54.  
  55.  
  56.  
  57.  
  58. // for skill chat jquery
  59. $(document).ready(function(e) {
  60. //var windowBottom = $(window).height();
  61. var index=0;
  62. $(document).scroll(function(){
  63.     var top = $('.technical').height()-$(window).scrollTop();
  64.     console.log(top)
  65.     if(top<-1){
  66.         if(index==0){  
  67.            
  68.             $('.chart').easyPieChart({
  69.                 easing: 'easeOutBounce',
  70.                 onStep: function(from, to, percent) {
  71.                     $(this.el).find('.percent').text(Math.round(percent));
  72.                 }
  73.             });
  74.            
  75.         }
  76.         index++;
  77.     }
  78. })
  79. //console.log(nagativeValue)
  80. });
  81.  
  82.  
  83.  
  84.  
  85. // Smooth page scroll
  86. $(function() {
  87.   $('a[href*=#]:not([href=#])').click(function() {
  88.     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
  89.       var target = $(this.hash);
  90.       target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
  91.       if (target.length) {
  92.         $('html,body').animate({
  93.           scrollTop: target.offset().top -60
  94.         }, 1000);
  95.         return false;
  96.       }
  97.     }
  98.   });
  99. });
  100.  
  101.  
  102.  
  103.  
  104. // chart loading
  105. $(window).load(function() {
  106.    
  107.     var chart = window.chart = $('.chart').data('easyPieChart');
  108.     $('.js_update').on('click', function() {
  109.         chart.update(Math.random()*100);
  110.     });
  111. });
  112.  
  113.  
  114.  
  115.  
  116.  
  117. }(jQuery));
Advertisement
Add Comment
Please, Sign In to add comment