$(document).scroll(function () {
if ($(this).scrollTop() <= ($(".block").offset().top - $(window).height())) {
//sticky
} else {
//not sticky
}
}
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
app.use(express.static(__dirname + "/build/"));
app.get(/.*/, function (req, res) {
res.sendFile(__dirname + '/build/index.html');
});
app.listen(port);
* {
box-sizing: border-box;
}
.block {
background-color: red;
height: 200px;
width: 300px;
position: relative;
}
.block:before {
content: '';
position: absolute;
left: 0px;
top: 0px;
border-top: 30px solid white;
border-right: 30px solid red;
z-index: 1;
}
.block:after {
content: '';
display: none;
position: absolute;
left: -7px;
top: 14px;
width: 42px;
border-top: 1px solid black;
transform: rotate(-45deg);
z-index: 1;
}
.block:hover {
border: 1px solid black;
}
.block:hover:before {
left: -1px;
top: -1px;
}
.block:hover:after {
display: block;
}
var object = objectManager.objects.getById(objectId);
object.properties = {
address: json[objectId].name,
pic: json[objectId].photo
}
var objectState = objectManager.getObjectState(objectId);
if (!objectState.isClustered) {
objectManager.objects.balloon.open(objectId);
}
// jQuery plugin to prevent double submission of forms
jQuery.fn.preventDoubleSubmission = function() {
$(this).on('submit',function(e){
var $form = $(this);
if ($form.data('submitted') === true) {
// Previously submitted - don't submit again
e.preventDefault();
} else {
// Mark it so that the next submit can be ignored
$form.data('submitted', true);
}
});
// Keep chainability
return this;
};