La Boutique officielle de la Fédération française de cyclotourisme



La Boutique officielle de la Fédération française de cyclotourisme 0){ var size = $(‘.widget_search .overlay #listProducts’).data(‘size’); paginate = Math.ceil(size / nbProductPage); $(‘.pagination’).twbsPagination({ initiateStartPageClick: false, hideOnlyOnePage: false, totalPages: paginate, startPage: (startPage == 1 ? 1 : Math.ceil((startPage / nbProductPage))), maxVisible: ’12’, first:  », last:  », prev:  », onPageClick: function (event, page) { if(page == 1){ searchOffersheet(1); }else{ searchOffersheet((((page-1)*nbProductPage) + 1)); } $(« html, body »).animate({ scrollTop: $(‘.widget_search .overlay .listOffersheetsShop’).position().top}, « slow »); } }); }else{ $(‘.widget_search .overlay .listOffersheetsShop’).html(‘Aucun produit n’a été trouvé.]]>’); } } }else{ $(‘.widget_search .overlay .listOffersheets’).prepend(‘

Aucun produit ne correspond à la recherche

‘);
}
},
error: function(){
},
complete: function(){
requestOffersheets =  »;
$(‘.widget_search .overlay .listOffersheets .loadingAjax’).hide();
}
});
}

$(document).on(‘keyup’, ‘.inputSearchOffersheets’, function(e){
e.preventDefault;
var elm = $(this);
$(‘.widget_search .overlay .listPeople’).hide();

if(elm.val()== » ){

if((e.keyCode == 8 || e.keyCode == 46) && $(‘.overlay’).is(« :visible »)){
$(‘.widget_search .overlay’).fadeOut( « slow »);
$(‘html, body’).css({
overflow: ‘auto’,
height: ‘auto’
});
}

}else if(e.keyCode == 27){
$(‘.closeOverlay’).trigger(‘click’);
$(‘html, body’).css({
overflow: ‘auto’,
height: ‘auto’
});
}else{
if($(‘.inputSearchOffersheets’).val().length > 3){
$(‘.listOffersheets’).children().not(‘.loadingAjax’).remove();
$(‘.widget_search .overlay’).fadeIn( « slow »);
$(‘html’).css({
overflow: ‘hidden’,
height: ‘100%’
});
$(‘body’).css({
‘overflow-x’: ‘hidden’,
‘height’: ‘100%’
});

searchOffersheet(1);
}
}

if(e.keyCode == 13){
return false;
}
});

$(document).on(‘click’, ‘.closeOverlay’, function(e){
e.preventDefault();
$(‘.widget_search .overlay’).fadeOut( « slow », function() {
$(‘.inputSearchOffersheets’).val( »);
});
$(‘html, body’).css({
overflow: ‘auto’,
height: ‘auto’
});
})
});

Source


Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *