Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. <article>
  2. <div class="page two"></div>
  3. <div class="page three"></div>
  4. <div class="page four">
  5. <p>Given a jQuery object that represents a set of DOM elements, the .has() method constructs a new jQuery object from a subset of the matching elements. The supplied selector is tested against the descendants of the matching elements; the element will be included in the result if any of its descendant elements matches the selector.</p>
  6. <p>Given a jQuery object that represents a set of DOM elements, the .has() method constructs a new jQuery object from a subset of the matching elements. The supplied selector is tested against the descendants of the matching elements; the element will be included in the result if any of its descendant elements matches the selector.</p>
  7. <p>Given a jQuery object that represents a set of DOM elements, the .has() method constructs a new jQuery object from a subset of the matching elements. The supplied selector is tested against the descendants of the matching elements; the element will be included in the result if any of its descendant elements matches the selector.</p>
  8. </div>
  9. <div class="page five"></div>
  10. </article>
  11.  
  12. $(function() {
  13. $("p").css("opacity", "0");
  14. $(window).on('scroll mousewheel', function(e){
  15. var elem = $(".four").offset().top;
  16. var pos = $(this).scrollTop();
  17. if (pos + 100 > elem) {
  18. e.preventDefault();
  19. e.stopPropagation();
  20. return false;
  21. }
  22. });
  23. });
  24.  
  25. .page {
  26. height: 500px;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement