Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.
Jerin George
What you could do in a pure handlebars solution is to use the following helpers:
Where
Jerin George
You need to set
margin-top
to yourdiv
which wraps yourtooltips
in order to show yourtooltip
attop
. Below is the working snippetJerin George
personally may not agree with the decision of resuming a paused media automatically after n seconds. But for pure technical understanding I will share how I would do that.
Building on top of what you already have, you can have multiple commands on onClick separated by a semi-colon. Adding setTimeout() function call to play after 3000 ms (3 seconds):
Of course it would be better if you move all your code to a function and just call that function onclick. This way you can have more code without making HTML/view unreadable and crowded. Like this:
Edit: I corrected a typo: “paseNplay()” instead of “pauseNplay()” . Now it works perfectly!
Javascript:
Jerin George
Follows the code which will hide this div if there is any other div with wv-signupnotice present on the document. Hope it helps.
let divs = document.getElementsByClassName(‘button-wrapper’);
$(document).ready(function() {
if($('div').hasClass("wv-signupnotice"))
divs[0].style.display="none";
});
Upload New Product
Sign up to start learning
Help children in rural communities
Jerin George
mousedown: Fires when the user depresses the mouse button.
mouseup: Fires when the user releases the mouse button.
click: Fires when a mousedown and mouseup event occur on the same element.
you probably want to separate the click in mousedown and mouseup:
$(document).on("mousedown", "#img_to_deal_with", function(e){
let maxH = $('#img_to_deal_with').height();
let maxL = $('#img_to_deal_with').width();
let posX = e.pageX - this.offsetLeft;
let posY = e.pageY - this.offsetTop;
console.log("Height : " + maxH);
console.log("Width : " + maxL);
console.log("Down Height : "+ posY);
console.log("Down Width :" + posX);
}).on("mouseup", "#img_to_deal_with", function(e){
let maxH = $('#img_to_deal_with').height();
let maxL = $('#img_to_deal_with').width();
let posX = e.pageX - this.offsetLeft;
let posY = e.pageY - this.offsetTop;
console.log("Height : " + maxH);
console.log("Width : " + maxL);
console.log("Up Height : "+ posY);
console.log("Up Width :" + posX);
});