jQuery(document).ready(function($) { $('body').scroll(function() { var y = $(this).scrollTop(); // console.log(y); if (y > 50) { $('.jeg_stickybar').addClass('jeg_sticky_nav'); $('.jeg_stickybar').css('transform','translate3d(0px, 0px, 0px);'); } else { $('.jeg_stickybar').removeClass('jeg_sticky_nav'); } }); $('body').scroll(function() { var y = $(this).scrollTop(); // console.log(y); if (y > 480) { $('#mobile_head').addClass('jeg_sticky_nav'); $('#mobile_head').css('transform','translate3d(0px, 0px, 0px);'); } else { $('#mobile_head').removeClass('jeg_sticky_nav'); } }); $('body').scroll(function() { var siderar = $('.jeg_sidebar'), hT = $(siderar).offset().top, hH = $(siderar).outerHeight(), wH = $('body').height(), wS = $(this).scrollTop(); if (wS > (hT-wH)){ $(siderar).addClass('fixme'); }else{ $(siderar).removeClass('fixme'); } }); }); /* Enter Your Custom Front-end CSS Here */ var jnews_ajax_url = '/?ajax-request=jnews' ;window.jnews=window.jnews||{},window.jnews.library=window.jnews.library||{},window.jnews.library=function(){"use strict";var e=this;e.win=window,e.doc=document,e.noop=function(){},e.globalBody=e.doc.getElementsByTagName("body")[0],e.globalBody=e.globalBody?e.globalBody:e.doc,e.win.jnewsDataStorage=e.win.jnewsDataStorage||{_storage:new WeakMap,put:function(e,t,n){this._storage.has(e)||this._storage.set(e,new Map),this._storage.get(e).set(t,n)},get:function(e,t){return this._storage.get(e).get(t)},has:function(e,t){return this._storage.has(e)&&this._storage.get(e).has(t)},remove:function(e,t){var n=this._storage.get(e).delete(t);return 0===!this._storage.get(e).size&&this._storage.delete(e),n}},e.windowWidth=function(){return e.win.innerWidth||e.docEl.clientWidth||e.globalBody.clientWidth},e.windowHeight=function(){return e.win.innerHeight||e.docEl.clientHeight||e.globalBody.clientHeight},e.requestAnimationFrame=e.win.requestAnimationFrame||e.win.webkitRequestAnimationFrame||e.win.mozRequestAnimationFrame||e.win.msRequestAnimationFrame||window.