2016-12-24 18:53:44 +00:00
|
|
|
$('.navbar-nav li a').each(function () {
|
|
|
|
if ($($(this))[0].href == String(window.location)) {
|
|
|
|
$(this).parent().addClass('active');
|
|
|
|
}
|
|
|
|
else if (window.location.pathname == '/') {
|
|
|
|
$('.navbar-nav li').first().addClass('active');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$('.navbar-nav li').first().removeClass('active');
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2017-02-07 07:05:05 +00:00
|
|
|
function onEachFeature(feature, layer) {
|
|
|
|
var out = [];
|
|
|
|
if (feature.properties) {
|
|
|
|
for (var key in feature.properties) {
|
|
|
|
out.push(key + ": " + feature.properties[key]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
layer.bindPopup(out.join("<br />"));
|
|
|
|
}
|
2016-12-24 18:53:44 +00:00
|
|
|
|
|
|
|
// $(document).on('click', '.navbar-nav li', function () {
|
|
|
|
// $(".nav-list li").removeClass("active");
|
|
|
|
// $(this).addClass("active");
|
|
|
|
// });
|