Merge "docs: Updates to GIFs on WH home page" into mnc-io-docs
am: 5ca058d38e
* commit '5ca058d38ec22e0a160859aee8d774dc59bf759c':
docs: Updates to GIFs on WH home page
Change-Id: I280afb495fb816376e368ca16c2a401adfeeb3a2
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.0 MiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 9.2 MiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 69 KiB |
@@ -76,7 +76,9 @@ excludeFromSuggestions=true
|
|||||||
<div class="cols" style="margin-top:1em;">
|
<div class="cols" style="margin-top:1em;">
|
||||||
<div class="col-4of12 gif-container">
|
<div class="col-4of12 gif-container">
|
||||||
<img class="partner-gifs"
|
<img class="partner-gifs"
|
||||||
src="/images/topic/instant-apps/s3-BandH-static.png">
|
src="/images/topic/instant-apps/s3-BandH-static.png"
|
||||||
|
data-stat="/images/topic/instant-apps/s3-BandH-static.png"
|
||||||
|
data-anim="/images/topic/instant-apps/s3-BandH-animated.gif">
|
||||||
<p class="figure-caption">
|
<p class="figure-caption">
|
||||||
<em>B&H Photo<br/>
|
<em>B&H Photo<br/>
|
||||||
(via Google Search)</em>
|
(via Google Search)</em>
|
||||||
@@ -85,7 +87,9 @@ excludeFromSuggestions=true
|
|||||||
|
|
||||||
<div class="col-4of12 gif-container">
|
<div class="col-4of12 gif-container">
|
||||||
<img class="partner-gifs"
|
<img class="partner-gifs"
|
||||||
src="/images/topic/instant-apps/s3-BuzzFeed-static.png">
|
src="/images/topic/instant-apps/s3-BuzzFeed-static.png"
|
||||||
|
data-stat="/images/topic/instant-apps/s3-BuzzFeed-static.png"
|
||||||
|
data-anim="/images/topic/instant-apps/s3-BuzzFeed-animated.gif">
|
||||||
<p class="figure-caption">
|
<p class="figure-caption">
|
||||||
<em>BuzzfeedVideo<br/>
|
<em>BuzzfeedVideo<br/>
|
||||||
(via a shared link)</em>
|
(via a shared link)</em>
|
||||||
@@ -94,7 +98,9 @@ excludeFromSuggestions=true
|
|||||||
|
|
||||||
<div class="col-4of12 gif-container">
|
<div class="col-4of12 gif-container">
|
||||||
<img class="partner-gifs"
|
<img class="partner-gifs"
|
||||||
src="/images/topic/instant-apps/s3-ParkandPay-static.png">
|
src="/images/topic/instant-apps/s3-ParkandPay-static.png"
|
||||||
|
data-stat="/images/topic/instant-apps/s3-ParkandPay-static.png"
|
||||||
|
data-anim="/images/topic/instant-apps/s3-ParkandPay-animated.gif">
|
||||||
<p class="figure-caption">
|
<p class="figure-caption">
|
||||||
<em>Park and Pay<br/>
|
<em>Park and Pay<br/>
|
||||||
(via NFC)</em>
|
(via NFC)</em>
|
||||||
@@ -263,18 +269,30 @@ excludeFromSuggestions=true
|
|||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
function swapOnMouseover(evt) {
|
function onMouseEnter(evt) {
|
||||||
var target = evt.target;
|
if (evt.target.dataset && evt.target.dataset.anim) {
|
||||||
var imageSrc = $(target).attr("src");
|
swap(evt.target, {
|
||||||
|
newStr: evt.target.dataset.anim
|
||||||
// Assumes that images are named *-static and *-animated.
|
});
|
||||||
if (imageSrc.indexOf("static") > -1) {
|
|
||||||
var newImageSrc = imageSrc.replace("static.png", "animated.gif");
|
|
||||||
$(target).attr("src", newImageSrc).removeAttr("onmouseenter");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".partner-gifs").mouseenter(swapOnMouseover);
|
function onMouseOut(evt) {
|
||||||
|
if (evt.target.dataset && evt.target.dataset.stat) {
|
||||||
|
swap(evt.target, {
|
||||||
|
newStr: evt.target.dataset.stat
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function swap(target, options) {
|
||||||
|
if (options && options.newStr) {
|
||||||
|
$(target).attr("src", options.newStr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".partner-gifs").mouseenter(onMouseEnter);
|
||||||
|
$(".partner-gifs").mouseout(onMouseOut);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.0 MiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 9.2 MiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 69 KiB |