Hello,
I was just wondering how I could go about introducing a scrolling mechanism instead of new rows being added when there are more than 3 items added to this section?
Many Thanks!
.gk-news-gallery .gk-images-wrapper.gk-images-cols6 > a {
margin-bottom: 40px;
width: 32.66%;
}
Simplicity/gavern/config/widgets.json
function gavern_create_post_type()
jQuery(window).scroll(function() {
// menu animation
if(page_loaded && jQuery('body').hasClass('imageBg')) {
// if menu is not displayed now
if(jQuery(window).scrollTop() > headerHeight && !jQuery('#gk-menu-wrap').hasClass('active')) {
//document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');
jQuery('#gk-menu-wrap').append(jQuery('#gk-header-nav'));
jQuery('#gk-head').attr('class', 'gk-no-menu');
// hide
jQuery('#gk-menu-wrap').attr('class', 'active');
}
//
if(jQuery(window).scrollTop() <= headerHeight && jQuery('#gk-menu-wrap').hasClass('active')) {
jQuery('#gk-head').first('div').css('display', 'block');
jQuery('#gk-head').first('div').prepend(jQuery('#gk-header-nav'));
jQuery('#gk-head').attr('class', '');
jQuery('#gk-menu-wrap').attr('class', '');
}
}
jQuery(window).load(function() {
// menu animation
jQuery('#gk-menu-wrap').append(jQuery('#gk-header-nav'));
jQuery('#gk-head').attr('class', 'gk-no-menu');
// hide
jQuery('#gk-menu-wrap').attr('class', 'active');
body #TB_window {
margin-left: -157px!important;
margin-top: -190px!important;
width: 320px!important;
}
#TB_iframeContent {
width: 320px!important;
}
//
// some touch devices hacks
//
var links_container = jQuery('body').find('.gk-video-link');
// register start event
var links_time_start = 0;
var links_swipe = false;
// here
links_container.bind('touchstart', function(e) {
links_swipe = true;
var touches = e.originalEvent.changedTouches || e.originalEvent.touches;
if(touches.length > 0) {
links_time_start = new Date().getTime();
}
});
// and then
links_container.bind('touchend', function(e) {
var touches = e.originalEvent.changedTouches || e.originalEvent.touches;
if(touches.length > 0 && links_swipe) {
if(new Date().getTime() - links_time_start <= 500) {
window.location = links_container.attr('href');
}
}
});
//
// some touch devices hacks
//
var links_container = jQuery('body').find('.gk-video-link');
// register start event
var links_time_start = 0;
var links_swipe = false;
// here
links_container.bind('touchstart', function(e) {
links_swipe = true;
var touches = e.originalEvent.changedTouches || e.originalEvent.touches;
if(touches.length > 0) {
links_time_start = new Date().getTime();
}
});
// and then
links_container.bind('touchend', function(e) {
var touches = e.originalEvent.changedTouches || e.originalEvent.touches;
if(touches.length > 0 && links_swipe) {
if(new Date().getTime() - links_time_start <= 500) {
window.location = links_container.attr('href');
}
}
});
});
Piotr Kunicki wrote:Regards white menu background, go to Simplicity/js/gk.scripts.js file and change this fragment:to
- Code: Select all
jQuery(window).scroll(function() {
// menu animation
if(page_loaded && jQuery('body').hasClass('imageBg')) {
// if menu is not displayed now
if(jQuery(window).scrollTop() > headerHeight && !jQuery('#gk-menu-wrap').hasClass('active')) {
//document.id('gkHeaderNav').inject(document.id('gkMenuWrap'), 'inside');
jQuery('#gk-menu-wrap').append(jQuery('#gk-header-nav'));
jQuery('#gk-head').attr('class', 'gk-no-menu');
// hide
jQuery('#gk-menu-wrap').attr('class', 'active');
}
//
if(jQuery(window).scrollTop() <= headerHeight && jQuery('#gk-menu-wrap').hasClass('active')) {
jQuery('#gk-head').first('div').css('display', 'block');
jQuery('#gk-head').first('div').prepend(jQuery('#gk-header-nav'));
jQuery('#gk-head').attr('class', '');
jQuery('#gk-menu-wrap').attr('class', '');
}
}
- Code: Select all
jQuery(window).load(function() {
// menu animation
jQuery('#gk-menu-wrap').append(jQuery('#gk-header-nav'));
jQuery('#gk-head').attr('class', 'gk-no-menu');
// hide
jQuery('#gk-menu-wrap').attr('class', 'active');
Try something like this, and do tests.
killroy10 wrote:Tried this but the menu animation is still there and I can see the other, first top menu on page load. It's like the white menu is on top of the old one. Any fix for this?
Piotr Kunicki wrote:Hi @killroy10,
Did you try to replace this fragment with gk.scripts.js file from my attachment? (few posts above).