Ontic Works Inc. is a studio based in Toronto, dedicated to architecture and design. Like the person in red tuque above, we explore ideas and stare until the ontological fog clears up, a great idea appears, and a truly ontic work is created.
Click Save to apply the script.
3. Add Global CSS for Draggable Text
Go to Appearance > Customize > Additional CSS.
Add the following CSS:
css
Copy code
.draggable-text {
position: relative;
z-index: 9999;
cursor: grab;
display: inline-block; /* Ensures the text is treated as a block for dragging */
}
document.addEventListener('mousemove', function(e) {
if (isDragging) {
image.style.left = (e.clientX - offsetX) + 'px';
image.style.top = (e.clientY - offsetY) + 'px';
image.style.position = 'absolute';
}
});
document.addEventListener('mouseup', function() {
isDragging = false;
image.style.cursor = 'grab';
// Optionally reset the z-index after dragging
image.style.zIndex = 9999;
});
});
});