I had the honor to create 360 degree panoramas of this lovely store in Riggisberg called Särnefee. It’s an art-deco store with loads of treasures and beautiful things.
I also did their website and the detail photos in the store (mostly used as backgrounds on the website).
Google maps are used almost everywhere to either implement an address of a business, club, store or anything else on a lot of pages on the internet. It’s a nice and convenient way to do it.
BUT… almost on all pages where this is done, when you scroll down using the mouse wheel, once the mouse ends up inside the Google map, the map starts zooming out instead of the page continuing to scroll down.
Here’s how to make a Google map not zoom in or out when you scroll down a page with the mouse wheel and only zoom, pan or do anything with the Google map as soon as you click inside the map. The following workflow also blocks zooming again once the mouse leaves the Google map area.
I got this from Stackoverflow, reproducing it here in case the zombie apocalypse breaks out and stackoverflow goes bun bun.
First you want to add the following style to your website or custom CSS script in your WordPress installation:
.scrolloff {
pointer-events: none;
}
Then you want to add the following JavaScript to the page:
<script type="text/javascript">
jQuery(document).ready(function($) {
console.log("allLoaded");
// you want to enable the pointer events only on click;
jQuery('#map_canvas1').addClass('scrolloff'); // set the pointer events to none on doc ready
console.log("scrolloffAddedA");
jQuery('#canvas1').on('click', function () {
console.log("clickDetected");
jQuery('#map_canvas1').removeClass('scrolloff'); // set the pointer events true on click
console.log("scrolloffRemoved");
});
// you want to disable pointer events when the mouse leave the canvas area;
jQuery("#map_canvas1").mouseleave(function () {
console.log("mouseLeft");
jQuery('#map_canvas1').addClass('scrolloff'); // set the pointer events to none when mouse leaves the map area
console.log("scrolloffAddedB");
});
});
</script>
Note that I have a whole lot of echo’s in the code which let’s you debug the code. You might want to consider switching that off for efficiency.
And finally that’s how you want to embed the map itself:
If you self host your website or blog, you will need this plugin.
Here’s some examples of source code:
Some CSS code:
.scrolloff {
pointer-events: none;
}
A JavaScript:
<script type="text/javascript">
jQuery(document).ready(function($) {
console.log("allLoaded");
// you want to enable the pointer events only on click;
jQuery('#map_canvas1').addClass('scrolloff'); // set the pointer events to none on doc ready
console.log("scrolloffAddedA");
jQuery('#canvas1').on('click', function () {
console.log("clickDetected");
jQuery('#map_canvas1').removeClass('scrolloff'); // set the pointer events true on click
console.log("scrolloffRemoved");
});
// you want to disable pointer events when the mouse leave the canvas area;
jQuery("#map_canvas1").mouseleave(function () {
console.log("mouseLeft");
jQuery('#map_canvas1').addClass('scrolloff'); // set the pointer events to none when mouse leaves the map area
console.log("scrolloffAddedB");
});
});
</script>
Here’s a blog post from the Ultimatum theme developers about using parallax layers in Ultimatum. I was curious if we could use parallax backgrounds within a page/post and asked the dev’s this question. After getting an answer on my question I continued the discussion with their support via private messaging. Here’s the technique that came from this discussion.
First, following the blog post, create a div and add the class «parallax» to it.
That should look something like this:
<div class="parallax">
...
</div>
NOTE: You don’t need to call it «parallax». You can call it whatever. You just have to use the same name in the css code. Because you will have to add the calls to the stellar java script as well for the parallax to work. Ultimatum uses Mark Dalgleish’s Stellar Java script.
The number on the ratio actually defines how fast the parallax layer will move. At a value of 0.5 the parallax moves at medium speed. If you go higher the parallax will move slower. At a value of 1 the parallax layer is not moving at all. But at a value of 2.0 it will move fast. Besides that you can use all the arguments/calls listed here.
In your CSS script you can talk to the parallax layer like this
Ever had clients that could not decide on which font to use on their website?
here’s solution to implement choice!
Header Type 1
Header Type 2
Header Type 3
Header Type 4
Text Blocksatz
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam gravida neque dolor, a ultricies justo viverra mattis. Donec feugiat mollis orci, commodo rutrum urna molestie et. In blandit lobortis eros, at tempus lacus suscipit non. Maecenas dolor nibh, dictum vel pellentesque eu, pharetra at libero. Donec placerat fermentum magna, sit amet vestibulum dui ullamcorper in. Suspendisse nisi urna, rutrum nec arcu quis, feugiat aliquam velit. Donec molestie nisi urna, sit amet fermentum nisi blandit a. Cras tincidunt semper vulputate. Aliquam vehicula eget felis nec molestie.
Text Linksbündig
Praesent eu scelerisque est, vel volutpat nulla. Cras imperdiet enim nulla, eget pretium nibh egestas non. Cras ullamcorper, purus in varius maximus, risus massa pharetra diam, sit amet congue elit nunc a nunc. Proin lobortis elementum ante. Aenean feugiat magna vitae massa dignissim, a pharetra ex posuere. Nam ut accumsan mauris. Morbi augue nulla, rhoncus eu turpis et, ornare rhoncus tellus. Quisque metus nisi, pretium vitae tortor ac, interdum tempor quam.
Text Rechtsbündig
Praesent eu scelerisque est, vel volutpat nulla. Cras imperdiet enim nulla, eget pretium nibh egestas non. Cras ullamcorper, purus in varius maximus, risus massa pharetra diam, sit amet congue elit nunc a nunc. Proin lobortis elementum ante. Aenean feugiat magna vitae massa dignissim, a pharetra ex posuere. Nam ut accumsan mauris. Morbi augue nulla, rhoncus eu turpis et, ornare rhoncus tellus. Quisque metus nisi, pretium vitae tortor ac, interdum tempor quam.
Text Zentriert
Praesent eu scelerisque est, vel volutpat nulla. Cras imperdiet enim nulla, eget pretium nibh egestas non. Cras ullamcorper, purus in varius maximus, risus massa pharetra diam, sit amet congue elit nunc a nunc. Proin lobortis elementum ante. Aenean feugiat magna vitae massa dignissim, a pharetra ex posuere. Nam ut accumsan mauris. Morbi augue nulla, rhoncus eu turpis et, ornare rhoncus tellus. Quisque metus nisi, pretium vitae tortor ac, interdum tempor quam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit Email
<script>
function changeFont(font){
document.getElementById("output-text").style.fontFamily = font.value;
}
</script>
And the html for the content:
<h3>Lorem ipsum dolor</h3>
<h4>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h4>
<p style="text-align: justify;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam gravida neque dolor, a ultricies justo viverra mattis. Donec feugiat mollis orci, commodo rutrum urna molestie et. In blandit lobortis eros, at tempus lacus suscipit non. Maecenas dolor nibh, dictum vel pellentesque eu, pharetra at libero. Donec placerat fermentum magna, sit amet vestibulum dui ullamcorper in. Suspendisse nisi urna, rutrum nec arcu quis, feugiat aliquam velit. Donec molestie nisi urna, sit amet fermentum nisi blandit a. Cras tincidunt semper vulputate. Aliquam vehicula eget felis nec molestie.</p>
<p style="text-align: justify;">Praesent eu scelerisque est, vel volutpat nulla. Cras imperdiet enim nulla, eget pretium nibh egestas non. Cras ullamcorper, purus in varius maximus, risus massa pharetra diam, sit amet congue elit nunc a nunc. Proin lobortis elementum ante. Aenean feugiat magna vitae massa dignissim, a pharetra ex posuere. Nam ut accumsan mauris. Morbi augue nulla, rhoncus eu turpis et, ornare rhoncus tellus. Quisque metus nisi, pretium vitae tortor ac, interdum tempor quam.</p>
<p style="text-align: left;">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p style="text-align: left;"><strong>Lorem ipsum dolor sit amet, consectetur adipiscing elit <a href="mailto:alex@fullframestudios.ch">Email</a></strong></p>
<p style="text-align: left;"><strong>Lorem ipsum dolor sit amet <a href="#">Kontaktformular</a></strong></p>