JSFiddle - React, Tailwind, and code Playground
by Magni Hansen
HTML
<div id="container">
<button id="loadmap">
Load map
</button>
</div>
JavaScript
; (function ($, window, document, undefined) {
$.fn.loadResultElementFunctions = function (options) {
var defaults = {
sitebid: '',
houseid: '',
language: '',
activateGallerySlider: true,
showGallerySlideNumber: true,
showImageLabel: true,
showOnMapContainerClass: '',
activateMap: true,
map_params: [] // 0:lat, 1:lng, 2:zoom, 3:address1, 4:address2, 5:photosrc, 6:phototext, 7:price
};
this.loadMap = function loadMap() {
alert('loadMap');
};
};
$('#loadmap').click(function(){
var lm = $(this).loadResultElementFunctions();
lm.loadMap();
});
})(jQuery, window, document); // loadResultElementFunctions