Commit dd2bc4d8 authored by imac's avatar imac

[Bugfix]JIRA : NAP-55 -> Click to show map on mobile

parent 874d536d
...@@ -16,7 +16,6 @@ function initMap(){ ...@@ -16,7 +16,6 @@ function initMap(){
var initialClassNum = 'st5'; var initialClassNum = 'st5';
var proceed = false; var proceed = false;
if (svg.find("#nap-carte-dep-"+dep).length) { if (svg.find("#nap-carte-dep-"+dep).length) {
console.log('inside map');
svg.find("#nap-carte-dep-"+dep).attr('class', initialClassDep + ' ' + zone + ' zonedep'); svg.find("#nap-carte-dep-"+dep).attr('class', initialClassDep + ' ' + zone + ' zonedep');
svg.find("#nap-carte-numero-dep-"+dep).attr('class', initialClassNum + ' ' + zone + 'num zonenum'); svg.find("#nap-carte-numero-dep-"+dep).attr('class', initialClassNum + ' ' + zone + 'num zonenum');
proceed = true; proceed = true;
...@@ -68,16 +67,16 @@ function selectZone(zone, initialClassDep, initialClassNum) { ...@@ -68,16 +67,16 @@ function selectZone(zone, initialClassDep, initialClassNum) {
window.selectedZone = zone; window.selectedZone = zone;
} }
function showMap(){ function showMap(){
jQuery(document).find('.filter-wrapper .header-filter-contact .open-filter').on('click touchend', function(){ jQuery(document).find('.filter-wrapper .header-filter-contact .open-filter').on('click', function(){
var toggleButton = $(this).parent(); var toggleButton = $(this).parent();
toggleButton.toggleClass('on'); toggleButton.toggleClass('on');
$('.filter').appendMap(); $('.filter').appendMap();
if (toggleButton.hasClass('on')){ if (toggleButton.hasClass('on')){
$('.filter, .details, .active-com, .map').slideDown(); $('.filter, .details, .active-com').stop().slideDown();
$('.map').fadeIn(); setTimeout(function(){ $('.map').fadeIn() },1000);
}else{ }else{
$('.filter, .details, .active-com').slideUp(); $('.filter, .details, .active-com').stop().slideUp();
$('.map').fadeOut(); setTimeout(function(){ $('.map').fadeOut() },1000);
} }
checkFilterContactWrapper(); checkFilterContactWrapper();
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment