function map() { var mymap = L.map('map').setView([51.505, -0.09], 13); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', { maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, ' + 'CC-BY-SA, ' + 'Imagery © Mapbox', id: 'mapbox.streets' }).addTo(mymap); L.marker([51.5, -0.09]).addTo(mymap) .bindPopup("Hello world!
I am a popup.").openPopup(); L.circle([51.508, -0.11], 500, { color: 'red', fillColor: '#f03', fillOpacity: 0.5 }).addTo(mymap).bindPopup("I am a circle."); L.polygon([ [51.509, -0.08], [51.503, -0.06], [51.51, -0.047] ]).addTo(mymap).bindPopup("I am a polygon."); var popup = L.popup(); 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 = $card.masonry({ itemSelector: '.card', columnWidth: '.card', percentPosition: true, gutter: 10, transitionDuration: '0.2s' }); // $card.masonry({ // itemSelector: '.grid-item', // columnWidth: '.grid-sizer', // percentPosition: true // }) $grid.imagesLoaded().progress(function() { $grid.masonry(); }); // $card.multipleFilterMasonry({ // itemSelector: '.card', // filtersGroupSelector: '.tags' // }); } function slide() { $(".gal").slidesjs({ width: 940, height: 528, pagination: { active: false } }); } jQuery(document).ready(function($){ slide(); map(); // filteritem(); });