12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- function map() {
- var mymap = L.map('carte').setView([44.7365818, 4.9776488], 13);
- L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
- maxZoom: 18,
- id: 'mapbox.streets'
- }).addTo(mymap);
- L.marker([44.7365818, 4.9776488]).addTo(mymap)
- .bindPopup("<b>Hello world!</b><br />I am le campus.").openPopup();
- function onMapClick(e) {
- popup
- .setLatLng(e.latlng)
- .setContent("You clicked the map at " + e.latlng.toString())
- .openOn(mymap);
- }
- mymap.on('click', onMapClick);
- }
- function filteritem() {
- var $card = $('#item > .card');
- var $cat = $('.cat a');
- var $img = $('#item .img');
- var $grid = $('#archive #item, #calendrier #item').masonry({
- // columnWidth: 200,
- itemSelector: '.card',
- gutter: 10,
- transitionDuration: '0.2s'
- });
- $grid.imagesLoaded().progress(function() {
- $grid.masonry();
- });
- $grid.multipleFilterMasonry({
- itemSelector: '.card',
- filtersGroupSelector:'.filters'
- });
- }
- function slide() {
- $(".gal").slidesjs({
- width: 940,
- height: 528,
- pagination: {
- active: false
- }
- });
- }
- function links() {
- href="/organisez-vos-evenements"
- var $a = $('li a[href="/organisez-vos-evenements"]');
- var $map = $('a#carte');
- $a.on('click', function(e) {
- e.preventDefault();
- })
- $map.on('click', function(e) {
- e.preventDefault();
- })
- }
- jQuery(document).ready(function($){
- links();
- slide();
- filteritem();
- map();
- });
|