JSFiddle - React, Tailwind, and code Playground
by Kenny806
HTML
<script src="http://openlayers.org/en/v3.0.0/build/ol.js"></script>
<link rel="stylesheet" href="http://openlayers.org/en/v3.0.0/css/ol.css">
<div style="width:80%; height:80%; position:fixed; border: 1px solid;" id="map"></div>
JavaScript
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.MapQuest({layer: 'osm'})
}),
],
target: 'map',
view: new ol.View({
center: ol.proj.transform([4.666389, 50.009167], 'EPSG:4326', 'EPSG:3857'),
zoom: 5
})
});
var btn = document.querySelector('.ol-attribution');
var btnClone = btn.cloneNode(true);
btn.parentNode.replaceChild(btnClone, btn);
$(".ol-attribution").click(function() {
alert("It's showing the attribution anyway");
});