Firefox no transition when fading back in an image - html

I made a nice transition effect when switching between images, it sets the opacity to 0 (With a transition of all .5s) then .5s later (Via setTimeout) the src of the image is changed and it should fade back in.
It works fine on Chrome and IE but on firefox the image fades out and then instead of fading back to opacity:1 it just jumps straight to it.
Here is my code
Javascript:
AddEventListener(window, 'load', function () {
window.FadeinTime = 500;
var LargeImageDiv = document.getElementById('LargeImage');
window.LargeImage = LargeImageDiv.childNodes[1];
var LargeImageCaption = LargeImageDiv.childNodes[3];
var SlideText = ['Videography', 'Photography', 'Walkthroughs', 'Fine Art'];
window.Images = []; //Some image links
LargeImage.src = '/Resources/Home/' + window.Images[0];
window.AutoSlide = setInterval(function () {
var SlideNo = parseInt(LargeImage.getAttribute('data-slide')) + 1;
var SlideTextNo = parseInt(LargeImage.getAttribute('data-slideText')) + 1;
if (SlideNo == Images.length) SlideNo = 0;
if (SlideTextNo == SlideText.length) SlideTextNo = 0;
LargeImage.setAttribute('data-slide', SlideNo.toString());
LargeImage.setAttribute('data-slideText', SlideTextNo.toString());
LargeImageDiv.setAttribute('style', '-khtml-opacity:0;-moz-opacity:0;-ms-filter: alpha(opacity=0);-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);filter: alpha(opacity=0);opacity:0;');
setTimeout(function () {
LargeImage.src = '/Resources/Home/' + Images[SlideNo];
LargeImageCaption.innerHTML = SlideText[SlideTextNo];
LargeImageDiv.removeAttribute('style');
}, window.FadeinTime)
}, 2500)
});
HTML:
<div id="LargeImage" class='NoSelect' onclick='if(event.target.nodeName == "BUTTON") return; var u = this.childNodes[3].innerHTML; window.location=(u=="Videography"||u=="Walkthroughs"?"/Videos/View/"+u:"/Pictures/View/"+u);'>
<img src="" data-slide='0' data-slideText='0'/>
<pre class='Caption'>Videography</pre>
</div>
CSS:
body > div#Content > div#LargeImage {
cursor:pointer;
max-height:490px;
min-height:300px;
width:100%;
overflow:hidden;
margin:0 auto;
position:relative;
-moz-transition:.5s;
-webkit-transition:.5s;
-o-transition:.5s;
transition:.5s;
}
body > div#Content > div#LargeImage > button {
position:absolute;
bottom:5px;
right:5px;
;
}
body > div#Content > div#LargeImage > img {
width:100%;
margin-top:-10%;
}
body > div#Content > div#LargeImage > pre {
height:50px;
font-size:80px;
}

Related

workaround for chrome notifications manifest 3

I want to display the notifications using manifest 3, Is there a workaround thats possible than waiting for chrome 91?
As a fix I used data URI, but that doesnt work
chrome.notifications.create(
"1", {
iconUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAh2SURBVHic7d1fcFxlGcfx73M2aUrTUu0ALRKqFzgMelHpwDhqwVRikt3sbpIKjP/orQqOIyMjjNYhqKM4neFGHB2ndkoHodKhTdPuJtgyjaIjlaYUUMFROmALTYHS1NTapLvn8aJpTUua5pycPWeb9/ncZTPP+z497y+727PvOQvGGGOMMcYYt8h0B9DtzKdEDuF6lLlRNGUu6D8Ie6mjR5YzNJ2BphUA7eOrwI+A909nHBPaUWCVtPJw2AFCB0Cf4gcoq8LWmwgJq6WFb4crDUH7aAJ+G7beVIDSJmmKQcu8UJMJq7DFry4e3wtTFngRdTvzKXMYSIWZ0FSM4rNQMrwdpCj4M0CZBmzxq5GQYnHQouABEGYHrjHx8LkkaEm49wBmxrAAOM4C4DgLgOMsAI6zADjOAuA4C4DjLACOswA4zgLgOAuA4ywAjrMAOM4C4DgLgOMsAI6zADiuJnDFSfYxi2WUeJ1LGGIUBepJMZdRribFtSjXAp8Abgw1hxnvBPBnhD+ivIzPPyizH+G4ZDmiu6lliAWUaaCOV4MOXtGt3bqFecymEeULCB1o8D1rjhoGNqM8xmx+J8s5UamJYtvbr0UuxWMlcA/wwbjmvci8ivIQJdZJjuNxTBj7xR26m1oOcwfKD4Er456/Sr2J8B2O8qjcTjnOiRO7uke3Mx+f76Pchbv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c8rrYuqgcbGRr+/vz+q4S46qqwX0Uj+EH0/9U4U4xhjjDHGGGNmsv8BludiHyoO7UAAAAAASUVORK5CYII=",
title: "This should be a notification",
type: "basic",
message: "Notification body",
isClickable: true,
priority: 2,
},
function () { }
);
You could create a tiny library that do some similar to chrome.notification.
I had done something similar for progress notifications which Firefox (did|do) not support.
I hope this code inspires you.
However, I suggest you wait for MV3 to be a little more "mature"
JS:
function myNotif(id, title, body, zIdx, evnt) {
let divL1 = document.createElement("div");
divL1.id = 'myNotif_' + id;
divL1.className = 'myNotifClass';
//X per chiudere
let divL2 = document.createElement("div");
divL2.className = 'myNotifClass_X';
divL2.innerHTML = '<SVG WIDTH="10" HEIGHT="10" viewBox="0 0 20 20"><path stroke-width="3" stroke="black" class="checkmark__check" fill="none" d="M0 0 20 20 M20 0 0 20" /></SVG>';
if (evnt) {
if (evnt._onClose)
divL2.addEventListener('click', function() { evnt._onClose(); document.body.removeChild(this.parentNode) })
else
divL2.addEventListener('click', function() { document.body.removeChild(this.parentNode) })
}
divL1.appendChild(divL2);
//TITOLO
divL2 = document.createElement("div");
divL2.className = 'myNotifClass_title';
divL2.textContent = title;
divL1.appendChild(divL2);
//img & body
divL2 = document.createElement("div");
divL2.className = 'myNotifClass_img_body';
//img
let divL3 = document.createElement("div");
divL3.className = 'myNotifClass_img';
divL2.appendChild(divL3);
//body
divL3 = document.createElement("div");
divL3.className = 'myNotifClass_body';
let divL4 = document.createElement("div");
divL4.className = 'myNotifClass_bodyUp';
let divL5 = document.createElement("div");
divL5.id = 'myNotif_' + id + '_bodyUp_CT';
divL5.className = 'myNotifClass_bodyUp_CT';
divL5.innerHTML = body;
divL4.appendChild(divL5);
divL3.appendChild(divL4);
divL4 = document.createElement("div");
divL4.className = 'myNotifClass_bodyDown';
divL5 = document.createElement("progress");
divL5.id = 'myNotif_' + id + '_Progress';
divL5.value = 0;
divL5.max = 100;
divL4.appendChild(divL5);
divL3.appendChild(divL4);
divL2.appendChild(divL3);
divL1.appendChild(divL2);
divL1.style.zIndex = zIdx;
if (evnt)
if (evnt._onClick)
divL2.addEventListener('click', function() { evnt._onClick() });
document.body.appendChild(divL1)
}
CSS:
progress {
margin:3px 4px;
width:230px;
height:6px;
border-radius:2px
}
progress::-moz-progress-bar {
background-color:#1e90ff;
border-radius:2px
}
.myNotifClass {
font-family:Verdana, Calibri;
position:fixed;
bottom:8px;
right:9px;
width:351px;
height:115px;
background-color:white;
border:1px solid gray;
box-shadow:1px 1px darkgray;
color:black;
}
.myNotifClass .myNotifClass_X {
position:relative;
float:right;
top:5px;
right:8px
}
.myNotifClass .myNotifClass_title {
font-size:12px;
font-weight:bold;
position:relative;
top:7px;
left:8px;
width:316px;
height:14px;
background-color:inherit;
border:0px;
padding:2px;
overflow:hidden
}
.myNotifClass .myNotifClass_img_body {
font-size:12px;
position:relative;
left:8px;
top:7px;
bottom:8px;
width:320px;
height:80px;
background-color:inherit;
border:0px;
padding:0px
}
.myNotifClass .myNotifClass_img_body .myNotifClass_img {
position:inherit;
float:left;
left:0px;
top:0px;
height:100%;
width:80px;
background-image:url('./wait.png');
background-position:center;
background-size:auto;
background-repeat:no-repeat;
background-color:inherit;
margin:0
}
.myNotifClass .myNotifClass_img_body .myNotifClass_body {
position:inherit;
float:right;
right:0px;
height:100%;
width:240px;
background-color:inherit;
margin:0
}
.myNotifClass .myNotifClass_img_body .myNotifClass_body .myNotifClass_bodyUp{
font-size:11px;
height:53px;
line-height:130%;
width: 236px; /*calc(100%-4px);*/
background-color:inherit;
padding:5px 2px 5px 2px;
overflow:hidden;
display:table
}
.myNotifClass .myNotifClass_img_body .myNotifClass_body .myNotifClass_bodyUp .myNotifClass_bodyUp_CT {
display:table-cell;
height:100%;
vertical-align:middle
}
.myNotifClass .myNotifClass_img_body .myNotifClass_body .myNotifClass_bodyDown{
height:17px;
width:100%;
background-color:inherit
}
HTML:
<HTML>
<HEAD>
<LINK TYPE="text/css" REL="stylesheet" HREF="./provaNotifDIV.css">
<SCRIPT SRC="./provaNotifDIV.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function startProgress() {
var timer = setInterval( function() {
let x = document.getElementById('myNotif_1_Progress');
if (x.value >= 100) {
clearTimeout(timer);
document.getElementById('myNotif_1_bodyUp_CT').textContent = "FATTO!"
}
else {
x.value += 1;
document.getElementById('num').textContent = x.value
}
}, 12)
}
document.addEventListener('DOMContentLoaded', function() {
myNotif(1, 'Trasferimento Indicatori in corso...', '<SPAN ID="num">0</SPAN> su <SPAN ID="denom">100</SPAN> caricati', 100, {'_onClick': function() { alert('click') }, '_onClose': function() {alert('close')} });
startProgress()
})
</SCRIPT>
</HEAD>
<BODY>
Ciao
</BODY>
</HTML>

How to have a non-rectangular div?

With HTML/CSS, how to create a non-rectangular red container like this:
which is basically a "rectangle avoiding a top right rectangle":
Is there another solution than having float: right; for the top right blue container?
Reason: I'm looking for other methods than float: right because of an Electron bug that prevent clicks to be caught correctly on the top right blue container, when the red container is a "draggable" title bar for an app window.
The following snippet works perfectly, but I'm looking for another solution without float: right:
for (var i = 0; i < 50; i++)
document.getElementById("topleft").innerHTML += "<button>xyz" + i + "</button>";
* { margin: 0; }
#topright { float: right; width: 100px; background-color: blue; -webkit-app-region: no-drag; }
#topright:hover { background-color: black; }
#topleft { background-color: red; -webkit-app-region: drag; padding: 10px; }
<div id="topright" onclick="alert();">Click here!</div>
<div id="topleft"></div>
finally! it took a little doing but I believe this should do it.
function myFunction2(){
alert('i was clicked')
}
function myFunction(){
for (let i = 0; i < 50; i++){
let x = 'a0' + i
let id = 'a' + (x).slice(-2)
document.getElementById(id).innerHTML = 'xyz' +i;
}
var end = 0;
var count = 0;
var left =[];
for (let i = 0; i < 25;i++){
let y = 30 + i*20;
let temp = document.elementFromPoint(18, y);
if (document.elementFromPoint(18, y)==null)return;
if (temp.tagName != 'SPAN')break;
let inner = temp.innerHTML;
let inArray = inner.split('z')
var start = parseInt(inArray[1]);
left.push(start)
}
left[left.length-1] = 50
for (var i = 0;i < left.length;i++){
for(let j = left[i]; j >= end; j--){
let x = 'a0' + j
let id = 'a' + (x).slice(-2)
if (document.getElementById(id) != null)
document.getElementById(id).innerHTML = 'xyz' + count;
count++;
}
end = left[i]+1
}
} window.addEventListener('resize', myFunction);
div{
margin:0;padding:0;
}
#better{
margin-top:20px;
display:block;
background:green;
width:100%;
position:relative;
padding:10px;
}
#abs{
display:inline-flex;
justify-content:center;
position:absolute;
background:blue;
height:30px;
width:100px;
top:0%;
right:0%;
}
span{
background:white;
border:solid 1px grey;
display:inline-block;
font-size:16px;
}
#fx{
display:flex;
flex-flow: row-reverse wrap;
justify-content:flex-end;
}
#x{
width:100px;
visibility:hidden;
}
<html>
<body >
<div id='better' >
<div id='fx'>
<span id='x'></span>
<span id='a00'>xyz0</span><span id='a01'>xyz1</span><span id='a02'>xyz2</span><span id='a03'>xyz3</span><span id='a04'>xyz4</span><span id='a05'>xyz5</span><span id='a06'>xyz6</span><span id='a07'>xyz7</span><span id='a08'>xyz8</span><span id='a09'>xyz9</span><span id='a10'>xyz10</span><span id='a11'>xyz11</span>
<span id='a12'>xyz12</span><span id='a13'>xyz13</span><span id='a14'>xyz14</span><span id='a15'>xyz15</span><span id='a16'>xyz16</span><span id='a17'>xyz17</span><span id='a18'>xyz18</span><span id='a19'>xyz19</span><span id='a20'>xyz20</span><span id='a21'>xyz21</span><span id='a22'>xyz22</span><span id='a23'>xyz23</span>
<span id='a24'>xyz24</span><span id='a25'>xyz25</span><span id='a26'>xyz26</span><span id='a27'>xyz27</span><span id='a28'>xyz28</span><span id='a29'>xyz29</span><span id='a30'>xyz30</span><span id='a31'>xyz31</span><span id='a32'>xyz32</span><span id='a33'>xyz33</span><span id='a34'>xyz34</span><span id='a35'>xyz35</span>
<span id='a36'>xyz36</span><span id='a37'>xyz37</span><span id='a38'>xyz38</span><span id='a39'>xyz39</span><span id='a40'>xyz40</span><span id='a41'>xyz41</span><span id='a42'>xyz42</span><span id='a43'>xyz43</span><span id='a44'>xyz44</span><span id='a45'>xyz45</span><span id='a46'>xyz46</span><span id='a47'>xyz47</span>
<span id='a48'>xyz48</span><span id='a49'>xyz49</span><span id='a50'>xyz50</span>
</div>
<div id='abs'>
<button type='button' onclick='myFunction2()'>Click me!</button>
</div>
</div>
</body>
</html>

Animate menu on scroll event

I am using the following code to create a hide/show nav
based on http://jsfiddle.net/mariusc23/s6mLJ/31/
my code
var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('nav').outerHeight();
$(window).scroll(function(event) { didScroll = true; });
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250);
function hasScrolled() {
var st = $(this).scrollTop();
if (Math.abs(lastScrollTop - st) <= delta)
return;
if (st > lastScrollTop && st > navbarHeight ) {
// Scroll Down
$('nav').removeClass('nav-down').addClass('nav-up');
} else {
// Scroll Up
if (st + $(window).height() < $(document).height()) {
$('nav').removeClass('nav-up').addClass('nav-down');
}
}
lastScrollTop = st;
}
However I want it to animate up when the user scrolls up OR down and then animates back when they are done scolling
It could be much simpler that that.
For example:
var didScroll;
$(window).scroll(function(event) { didScroll = true; });
setInterval(function() {
if (didScroll) {
$('header').removeClass('nav-down').addClass('nav-up');
didScroll = false;
}else{
$('header').removeClass('nav-up').addClass('nav-down');
}
}, 400);
body {
padding-top: 40px;
}
header {
background: #f5b335;
height: 40px;
position: fixed;
top: 0;
transition: top 0.2s ease-in-out;
width: 100%;
}
.nav-up {
top: -40px;
}
main {
background:url(
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPklEQVQYV2O8dOnSfwYg0NPTYwTRuAAj0QqxmYBNM1briFaIzRbi3UiRZ75uNgUHGbfvabgfsHqGaIXYPAMAD8wgC/DOrZ4AAAAASUVORK5CYII=
) repeat;
height: 2000px;
}
footer { background: #ddd;}
* { color: white}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<header class="nav-down">
This is your menu.
</header>
<main>
This is your body.
</main>
<footer>
This is your footer.
</footer>

Image doesn't show up in the absolute position

I have to put an image in the absolute position. This absolute position I make overflow hidden, so that it will height automatically, and of course, I make this absolute div inside the relative position.
But image only showing up when I change the position of absolute into relative.
Here is my code:
<div style="position:relative; display:block; overflow:hidden; float:left;">
<div style="position:absolute; overflow:hidden; display:block; top:0; left:0;">
<img src="WEBbgB.jpg" />
</div>
</div>
SOURCE CODE
<ul id="slideHome">
<li><img src="<?php base_url();?>assets/img/WEBbgA.jpg"/></li>
<li><img src="<?php base_url();?>assets/img/WEBbgB.jpg"/></li>
</ul>
CSS
#slideHome {
list-style: outside none none;
padding: 0px;
position: relative;
color: #FFF;
font-size: 18px;
float:left;
}
#slideHome li {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
background:green;
overflow:hidden;
margin: 0 auto;
}
#slideHome li img {
width:100%;
}
JS
$.noConflict();
jQuery( document ).ready(function( $ ) {
var triggers = $('ul#thumnalHome li');
var images = $('ul#slideHome li');
var lastElem = triggers.length-1;
var target;
triggers.first().addClass('active');
images.hide().first().show();
function sliderResponse(target) {
images.fadeOut(300).eq(target).fadeIn(300);
triggers.removeClass('active').eq(target).addClass('active');
}
triggers.click(function() {
if ( !$(this).hasClass('active') ) {
target = $(this).index();
sliderResponse(target);
resetTiming();
}
});
$('.next').click(function() {
target = $('ul#thumnalHome li.active').index();
target === lastElem ? target = 0 : target = target+1;
sliderResponse(target);
resetTiming();
});
$('.prev').click(function() {
target = $('ul#thumnalHome li.active').index();
lastElem = triggers.length-1;
target === 0 ? target = lastElem : target = target-1;
sliderResponse(target);
resetTiming();
});
function sliderTiming() {
target = $('ul#thumnalHome li.active').index();
target === lastElem ? target = 0 : target = target+1;
sliderResponse(target);
}
var timingRun = setInterval(function() { sliderTiming(); },5000);
function resetTiming() {
clearInterval(timingRun);
timingRun = setInterval(function() { sliderTiming(); },1000);
}
});
The reason Why I make this position absolute is because this is for slider purpose.
Any idea please.
it will not show up because of
overflow:hidden;
and not because of your position
apply
position:fixed; into your image
<img style="position:fixed;" src="WEBbgB.jpg" />
and that could make it visible
<div style=" position:relative; display:block; overflow:hidden; float:left;">
<div style=" position:absolute; overflow:hidden; display:block; top:0; left:0;">
<img style="position:fixed;" src="WEBbgB.jpg" />
</div>
</div>

Absolute positioning bug in display:table-cell in IE 11

Compare and contrast this JSfiddle in Chome (correct) and IE11 (very definitely not correct):
http://jsfiddle.net/Lr90ko3q/
IE seems to see the height of the CONTENT in the inner div, rather than the actual height of the div. In other words, if you add a couple more lines of content, the left/right arrows move down a bit.
Is this a known bug, and is there a usable workaround for it?
Thanks
(copy of JSfiddle code):
html {
box-sizing:border-box
}
*, *::before, *::after {
box-sizing:inherit
}
html, body {
position:relative;
width:100%;
height:100%
}
section {
width:60%;
height:60%;
position:relative;
background:rgba(0, 0, 0, 0.1)
}
section>.content {
display:table;
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
padding:50px
}
section>.content>div {
display:table-cell;
vertical-align:middle;
position:relative;
background:rgba(255, 0, 0, 0.2);
text-align:center
}
#left {
position:absolute;
left:5%;
top:50%;
margin:0;
transform:translateY(-50%)
}
#right {
position:absolute;
right:5%;
top:50%;
margin:0;
transform:translateY(-50%)
}
I fixed the issue by just adding JS that forces a fixed height on the table cell elements.
Also used native JS since the functionality is fairly simple and supported on each of the browsers.
Obviously replace .table/.table-cell with whatever you called your table/table-cell items that you're targeting.
"use strict";
var ua = navigator.userAgent.toLowerCase();
var ie_version = (ua.indexOf('msie') != -1) ? parseInt(ua.split('msie')[1]) : false;
if (!ie_version && ua.indexOf("trident") !== -1 && ua.indexOf("rv:11") !== -1)
{
ie_version = 11;
}
if (ie_version == 9 || ie_version == 10 || ie_version == 11)
{
(function(){
window.onresize = calculateTableCellHeights;
calculateTableCellHeights();
function calculateTableCellHeights() {
// Fixes IE9/10/11 bug where table-cell doesn't inherit table height
var tables = document.querySelectorAll(".table");
for (var t = 0; t < tables.length; ++t)
{
var table = tables[t];
var table_cells = table.querySelectorAll(".table-cell");
for (var c = 0; c < table_cells.length; ++c)
{
var table_cell = table_cells[c];
var display = window.getComputedStyle(table_cell, null).getPropertyValue("display");
if (display == "table-cell")
{
// Set fixed height
table_cell.style.height = table.offsetHeight+"px";
}
else
{
// If item is no longer a table-cell due to responsive stacking
// remove the height.
table_cell.style.height = "";
}
}
}
}
})();
}