$db = new mysqli(null, 'root', '', 'db_name');
$db->real_query("SELECT * FROM table_name");
$db_data = $db->use_result();
while ($row = $db_data->fetch_assoc()) {}
jQuery(window).scroll(function(){
var $sections = $('.section');
$sections.each(function(i,el){
var top = $(el).offset().top-100;
var bottom = top +$(el).height();
var scroll = $(window).scrollTop();
var id = $(el).attr('id');
if( scroll > top && scroll < bottom){
$('#pp-nav1 ul li a.active').removeClass('active');
$('#pp-nav1 ul li a[href="#'+id+'"]').addClass('active');
}
})
});
var Min = 660;
var Step = 30
function setTime($input) {
var hour = Math.floor(Min/60);
var min = Min % 60;
if (min < 10) {
min = '0' + min;
}
if (hour < 10) {
hour = '0' + hour;
}
$input.val(hour + ':' + min);
}
$('.decrease').click(function () {
Min -= Step;
if (Min <= 0) Min += 1440;
setTime($(this).parent().find('input'));
});
$('.increase').click(function () {
Min += Step;
if (Min >= 1440) Min -= 1440;
setTime($(this).parent().find('input'));
});
#mainmenu:hover #icemegamenu {
display: initial;
}
#icemegamenu {
display: none;
}