Hi,
is it possible to start the page with an open side menu?
Would be great, thank you
Monika!
jQuery('#gk-menu-button').click();
window.addEvent('domready', function() {
// smooth anchor scrolling
jQuery('a[href*="#"]').on('click', function (e) {
e.preventDefault();
if(this.hash !== '') {
if(this.hash !== '' && this.href.replace(this.hash, '') == window.location.href.replace(window.location.hash, '')) {
var target = jQuery(this.hash);
if(target.length && this.hash !== '#') {
jQuery('html, body').stop().animate({
'scrollTop': target.offset().top
}, 1000, 'swing', function () {
if(this.hash !== '#') {
window.location.hash = target.selector;
}
});
} else {
if(this.hash !== '#') {
window.location = jQuery(this).attr('href');
}
}
} else {
if(this.hash !== '#') {
window.location = jQuery(this).attr('href');
}
}
}
});
// style area
if(jQuery('#gkStyleArea').length > 0){
jQuery('#gkStyleArea').find('a').each(function(i, element){
jQuery(element).click(function(e){
e.preventDefault();
e.stopPropagation();
changeStyle(i+1);
});
});
}
// K2 font-size switcher fix
if(jQuery('#fontIncrease').length > 0 && jQuery('.itemIntroText').length > 0) {
jQuery('#fontIncrease').click(function() {
jQuery('.itemIntroText').attr('class', 'itemIntroText largerFontSize');
});
jQuery('#fontDecrease').click( function() {
jQuery('.itemIntroText').attr('class', 'itemIntroText smallerFontSize');
});
}
// Equal columns
gkEqualColumns();
// Floating sidebar
if(jQuery('#gk-right-top')) {
var top_area = jQuery('#gk-right-top');
var top_area_bg = jQuery('#gk-right-top-bg');
var win = jQuery(window);
var body = jQuery(document.body);
jQuery(window).scroll(function() {
if(win.width() >= body.attr('data-tablet-width')) {
var scrolled = win.scrollTop();
top_area.css('top', scrolled + 'px');
top_area_bg.css('top', scrolled + 'px');
} else {
top_area.css('top', '0px');
}
});
}
// Login popup
if(jQuery('#gk-login-btn')) {
var login_btn = jQuery('#gk-login-btn');
var sidebar = jQuery('#gk-right');
var popup = jQuery('#gkPopupLogin');
login_btn.click(function(e) {
e.preventDefault();
if(login_btn.hasClass('popup-open')) {
sidebar.removeClass('popup-open')
login_btn.removeClass('popup-open');
setTimeout(function() {
popup.css('display', 'none');
}, 350);
} else {
popup.css('display', 'block');
if(jQuery(window).width() <= jQuery(document.body).attr('data-tablet-width')) {
popup.css('top', '100px');
} else {
popup.css('top', (jQuery(window).scrollTop() + 100) + "px");
}
setTimeout(function() {
sidebar.addClass('popup-open');
login_btn.addClass('popup-open');
}, 50);
}
});
}
// search
var searchbox = jQuery('#gk-search .inputbox');
if(searchbox.length) {
jQuery('#gk-search').click(function() {
searchbox.trigger('focus');
});
searchbox.focus(function() {
var input = jQuery('#gk-search');
input.addClass('search-active');
});
searchbox.blur(function() {
var input = jQuery('#gk-search');
input.removeClass('search-active');
});
}
});
});
Cyberek wrote:Is there anything else I can help you with regarding this topic?