cmoreira

scroll to profile on mobile & extra div

Oct 10th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         //Scroll to profile
  2.  
  3.             jQuery('#tshowcase-bx-pager-0 a').on('click touchend',function() {
  4.                 if (window.outerWidth && window.outerWidth < 768) {
  5.  
  6.                         jQuery('html, body').animate({
  7.                         scrollTop: jQuery(".tshowcase-bxslider-0").offset().top-70
  8.                             }, 1000);
  9.                        
  10.  
  11.             }
  12.                        
  13.  
  14.         });
  15.  
  16.         //Add custom Layer
  17.         jQuery("<div />").css({
  18.             position: "absolute",
  19.             width: "100%",
  20.             height: "100%",
  21.             padding: "150px 0 0 0",
  22.             lineHeight: "1.3em",
  23.             fontSize: "2em",
  24.             left: 0,
  25.             top: 0,
  26.             background: "rgba(255,255,255,0.9)",
  27.             color: "#03ada5",
  28.             zIndex: 1000000,  // to be on the safe side
  29.         }).attr('id','team-overlay').html('Click team member<br>to learn more').appendTo(jQuery(".tshowcase-box").css("position", "relative").first());
  30.  
  31.         jQuery('#tshowcase-bx-pager-0').on('click touchend',function(){
  32.             jQuery('#team-overlay').remove();
  33.         });
Advertisement
Add Comment
Please, Sign In to add comment