<head>
<!-- The following HTML should include a <script> tag to import the jQuery library, if it is not already available. In Wordpress, jQuery should already be imported by default, so this step is not shown here. -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<!-- This imports the SightMap IFrame API library -->
<script src="https://sightmap.com/embed/api.js"></script>
<!-- This code imports the fancyBox files. -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.css" />
<script src="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.js"></script>
</head>
<body>
<h1>Apartment Guide: Lead gen demo</h1>
<p>
The interactive map is embedded on the web page. This may be embedded in-line or in a modal.</p>
<iframe id="sightmap" src="https://sightmap.com/embed/6m9pzmg4vk1?enable_api=1&origin=https://fiddle.jshell.net" frameborder="0" width="100%" height="100%"></iframe>
<div id="hidden-content">
<div class="modal">
<h3>Contact<br>The Confluence</h3><a class="_3iQId" href="tel:7203169145"><span data-tid="phone_link" data-tag_section="phone_number_link" data-tag_selection="phone" data-tag_action="lead_submission">(720) 316-9145</span></a>
<div data-tid="lead-form-wrapper" class="zfjgC">
<div class="Rjpst _3rO1F" id="inline-lead-form">
<div class="wrapper2">
<div class="_2ugl2">
<div class="_16O4U _7BaoZ"><label for="textArea-message" data-tid="message-label" class="_22kQB">Message</label><textarea data-tid="add-message-input" data-tag_item="text" id="textArea-message" tabindex="0" class="_3Qjrt">I'm interested in The Confluence. Please send me current availability and additional details.</textarea></div>
</div>
<div class="_16O4U"><label for="inline-lead-form-text-name" data-tid="name-label" class="_22kQB">Name</label><input...
document.addEventListener("DOMContentLoaded", function(event) {
// Create a new embed instance, providing the IFrame id value:
var embed = new SightMap.Embed('sightmap')
// Check to ensure embed is ready
embed.on('ready', function() {
console.log('hello world');
})
embed.on('apply', function() {
console.log('Contact Click');
$('#fancybox-modal-trigger').click()
})
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.