replied on August 17, 2015
Thanks Alex,
But Unfortunately there is no effect...
Below is the CSS:
.navbar {
text-align:center;
}
.navbar div {
padding-top: 12px;
cursor: pointer;
width: 165px;
height: 60px;
border-radius: 6px;
background-color: #D8DDB5;
text-align: center;
margin: auto;
border: 2px white solid;
display:inline-block;
font-size: 2px;
font-weight:normal;
color: #5B8772;
// position: relative;
// top: 0;
//left: 0;
// z-index: 9999;
//width: 100%;
// height: 50px;
}
.navbar div:hover {
//background-color: #B5CC8E;
background-color: Orange;
}
.navbar .selected{
background-color: #B5CC8E;
}
.hidden{
display: none;
}
#q257, #q258 {width: 20%;}
.cf-form {padding: 0px 10px 40px;}
#cf-formtitle {margin-bottom:0px;}
li[attrtype="custom"].form-focused {background-color:white;}
#q258, #q257 {display: inline-block; width: 350px};
.fixed {position: fixed;top: 0;margin: auto;}
& this is the JS:
$(document).ready(function () {
//start pagination
$('.navitem').on('touchstart click', function () {
$('.section1,.section2,.section3,.section4,.section5,.section6,.section7,.section8,.Submit').hide(); //Hide all sections first
$('.navbar').find('.navitem').removeClass('selected'); //Unselect tabs
if ($(this).hasClass('tab1')) {
$('.section1').show();
$('.navbar').find('.tab1').addClass('selected');
}
else if ($(this).hasClass('tab2')) {
$('.section2').show();
$('.navbar').find('.tab2').addClass('selected');
}
else if ($(this).hasClass('tab3')) {
$('.section3').show();
$('.navbar').find('.tab3').addClass('selected');
}
else if ($(this).hasClass('tab4')) {
$(".section4").show();
$('.navbar').find('.tab4').addClass('selected');
}
else if ($(this).hasClass('tab5')) {
$('.section5').show();
$('.navbar').find('.tab5').addClass('selected');
}
else if ($(this).hasClass('tab6')) {
$('.section6').show();
$('.navbar').find('.tab6').addClass('selected');
}
else if ($(this).hasClass('tab7')) {
$('.section7').show();
$('.navbar').find('.tab7').addClass('selected');
}
else if ($(this).hasClass('tab8')) {
$('.section8').show();
$('.navbar').find('.tab8').addClass('selected');
}
})
$('.navitem.tab1').trigger('click'); //Click on first tab
//end pagination
});
$(window).scroll(function(){
var sticky = $('.navbar'),
scroll = $(window).scrollTop();
if (scroll >= 100) sticky.addClass('fixed');
else sticky.removeClass('fixed');
});
Can you please advice?
Regards,
Sahil