<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"> </script>
<script>
var menu = $("header");
$(window).scroll(function() {
var top = $('html').scrollTop();
if (top >= 100) {
menu.css('background','green');
} else if ( top <= 200 ) {
menu.css('background','red');
}
});
</script>
var OnePageNav = function() {
$(".smoothscroll[href^='#'], #ftco-nav ul li a[href^='#']").on('click', function(e) {
e.preventDefault();
var hash = this.hash,
navToggler = $('.navbar-toggler');
$('html, body').animate({
scrollTop: $(hash).offset().top - $('#ftco-navbar').height()
}, 700, 'easeInOutExpo', function(){
window.location.hash = hash;
});
if ( navToggler.is(':visible') ) {
navToggler.click();
}
});
$('body').on('activate.bs.scrollspy', function () {
console.log('nice');
})
};
foreach ($results as $result) {
$data['orders'][] = array(
'order_id' => $result['order_id'],
'store_id' => $result['store_id'],
'customer' => $result['customer'],
'status' => $result['status'],
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])),
'shipping_code' => $result['shipping_code'],
'view' => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL'),
'edit' => $this->url->link('sale/order/edit', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL'),
);
}
$sql = "SELECT o.order_id, o.store_id, CONCAT(o.firstname, ' ', o.lastname) AS customer, (SELECT os.name FROM " . DB_PREFIX . "order_status os WHERE os.order_status_id = o.order_status_id AND os.language_id = '" . (int)$this->config->get('config_language_id') . "') AS status, o.shipping_code, o.total, o.currency_code, o.currency_value, o.date_added, o.date_modified FROM `" . DB_PREFIX . "order` o";
ymaps.ready(init);
function init() {
var myMap = new ymaps.Map('map', {
center: [50.443705, 30.530946],
zoom: 14
}, {
searchControlProvider: 'yandex#search'
}),
menu = $('<div class="menu"/>');
for (var i = 0, l = groups.length; i < l; i++) {
createMenuGroup(groups[i]);
}
function createMenuGroup (group) {
var menuItem = $('<div>' + group.name + '</div>'),
collection = new ymaps.GeoObjectCollection(null, { preset: group.style }),
submenu = $('<select class="submenu"/>');
myMap.geoObjects.add(collection);
menuItem.append(submenu).appendTo(menu)
for (var j = 0, m = group.items.length; j < m; j++) {
createSubMenu(group.items[j], collection, submenu);
}
}
function createSubMenu (item, collection, submenu) {
var submenuItem = $('<option value="">' + item.name + '</option>'),
placemark = new ymaps.Placemark(item.center, { balloonContent: item.name });
collection.add(placemark);
submenuItem.appendTo(submenu);
}
menu.appendTo($('body'));
myMap.setBounds(myMap.geoObjects.getBounds());
}