Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. $(document).ready(function() {
  2. $('.cta-btn, .portf1, .portf2, .portf3, .portf4, .portf5, .btn-facebook, .btn-twitter, .btn-linkedin, .btn-studiofacebook, .btn-studiotwitter,.btn-studiolinkedin,.newsitem1, .newsitem2, .newsitem3').append('<span class="hover"></span>').each(function () {
  3. var $span = $('> span.hover', this).css('opacity', 0);
  4. $(this).hover(function () {
  5. $span.stop().fadeTo(200, 1);
  6. }, function () {
  7. $span.stop().fadeTo(400, 0);
  8. });
  9. });
  10. });
  11.  
  12. $(function(){
  13. var stickyHeaderTop = $('#stickyheader').offset().top;
  14.  
  15. $(window).scroll(function(){
  16. if( $(window).scrollTop() > stickyHeaderTop ) {
  17. $('#stickyheader').css({position: 'fixed', top: '0px'});
  18. $('#stickyalias').css('display', 'block');
  19. } else {
  20. $('#stickyheader').css({position: 'static', top: '0px'});
  21. $('#stickyalias').css('display', 'none');
  22. }
  23. });
  24. });
  25.  
  26. <!-- portfolio -->
  27. <div id="portfoliowrapper">
  28. <div id="portfolioitems"></div>
  29. <script>$("#portfolioitems").load("werk.html #portfolio");</script>
  30. <div class="clear"></div>
  31. <a href="werk.html" class="cta-btn"><h2 class="btn">Werk</h2></a>
  32. </div>
  33.  
  34. $(function(){
  35. // code that depends on images being loaded here
  36. });
  37.  
  38. $(window).load(function(){
  39. // here all images in the HTML are guaranteed to be loaded
  40. });
  41.  
  42. $("#portfolio").offset() is null
  43. Line 33
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement