Hello all! I'm a freelance filmmaker and I'm trying to set up my own website through Squarespace.
I'm trying to have a gallery of images (static thumbnails of my videos) that has a hover over effect that turns that static thumbnail into a GIF with of the video in question (maintaining the same size of the thumbnail in the site).
This is an exact example of the effect I'm aiming for - without any transitions or other hover effects rather than turning the static image into a gif. ----> [login to view URL]
I found this piece of code that I'm injecting into the footer of my site but I don't know how to apply it to multiple images. I've only achieved 2 images but when I copy the formulas again again things start to get messy (2 gifs activate at the same time or the images change order within the page)
Here is the initial code:
<script>
(function() {
var imgs = [login to view URL]('img');
for (var i = 0, n = [login to view URL]; i < n; i++)
{
if (imgs[i].getAttribute("data-image-id") == "5502fcb0e4b03593df0d8ed2")
{
imgs[i].setAttribute("id", "targetIMG");
imgs[i].addEventListener("mouseover", newImage);
imgs[i].addEventListener("mouseout", oldImage);
break;
}
}
})();
function newImage() {
var img = [login to view URL]("targetIMG");
[login to view URL]("src").value = "[login to view URL]";
}
function oldImage() {
var img = [login to view URL]("targetIMG");
[login to view URL]("src").value = "[login to view URL]";
}
</script>
Here's my improvised modification that works like that for 2 images max:
<script>
(function() {
var imgs = [login to view URL]('img');
for (var i = 0, n = [login to view URL]; i < n; i++)
for (var i2 = 0, n = [login to view URL]; i < n; i++)
{
if (imgs[i].getAttribute("data-image-id") == "5c59360e104c7bf3fe7b39aa")
{
imgs[i].setAttribute("id", "targetIMG");
imgs[i].addEventListener("mouseover", newImage1, newImage2);
imgs[i].addEventListener("mouseout", oldImage1, oldImage2);
imgs[i2].setAttribute("id", "targetIMG2");
imgs[i2].addEventListener("mouseover", newImage2);
imgs[i2].addEventListener("mouseout", oldImage2);
break;
}
}
})();
function newImage1() {
var img = [login to view URL]("targetIMG");
[login to view URL]("src").value = "[login to view URL]";
}
function oldImage1() {
var img = [login to view URL]("targetIMG");
[login to view URL]("src").value = "[login to view URL]";
}
function newImage2() {
var img = [login to view URL]("targetIMG2");
[login to view URL]("src").value = "[login to view URL]";
}
function oldImage2() {
var img = [login to view URL]("targetIMG2");
[login to view URL]("src").value = "https://static1.squarespace.com/static/5a2e8f32bce1760b41249e7e/t/5c59417df9619a06daa06583/1549353357049/Captura+de+pantalla+2019-02-05+a+las+[login to view URL]";
}
</script>
I don't know any code and I'm looking for any freelance coder that could sort this out for me. I know nothing about coding and this is as far as I've reached.
Many thanks in advance.
Best,
Víctor.
Hi Victor,
I am an experienced Web Developer with years of knowledge in PHP/MySQL/JavaScript/JQuery. I quickly went through the sample code and understood what you want to achieve. I can help you out with the code and solve it in very quick time :)
Looking forward to hearing from you.
Regards,
Sid
$35 USD 1 päivässä
4,9 (433 arvostelua)
7,4
7,4
11 freelancerit tarjoavat keskimäärin $113 USD tätä projektia
Dear client
Honorable Senior
I am happy to apply in your project. Your project is interesting to me.
I have good skills about laravel and codegniter and php and nodejs
i am pretty sure I can meet your demand
I think that your job is good for me
I have experienced about 6+ years
I have free time and can begin the working now. No worry for my skill.
thanks to view my proposal
Hi.
I am a full stack developer and have been working for over 5 years on freelancer.com.
I have read your description in detail and have interests in your project.
I have some experiences that have ever done what is similar to your project.
As a solution, I have a good idea to build your project perfectly
I would like to have a discussion with chat to get more about your project.
Thanks.
Hello,
Hope you will be doing well!!
I have analyzed your description and I understand your functionality so that I can handle your project.
Please discuss with me for more clarification.
I strongly believe I can make a significant contribution to this task.
Thanks
Hello, I have gone through your description and code. I can do this job for you I can make this code run for you. I can start your job right away. I would like to discuss further over chat.
Thank You
Balouch Khan
Hello, Sir Weebside Inc. is a professional freelancer service provided to worthy clients like you.
We can provide our best developers to provide you High-Quality Product with 100% Delivery Rate, 100% Satisfaction.
Having Experts in Java, C / C++ , C# , VB , .NET , SQL, MySQL, and Python Programming Language and Frameworks made us capable to bid here.
We can provide any service of any caliber within Hours.
CHAT WITH US TO START RIGHT NOW.
BEST DEVELOPERS AROUND. WITH HIGHEST QUALITY DELIVERED WITHIN TIME. WITHIN BUDGET.
CLICK CHAT TO START
Hello Sir,I have 3 years experience of coding. I have read your code and can fix this issue.I will complete this project in stipulated time and within your budget for sure. I went through the job details carefully and damn sure that I can do the project very well. I have worked on similar projects you are looking for, and I am sure I can meet your expectations. I am expert in this field. Hope I included all information you are looking for in a freelancer. I can achieve the results that you are asking for.
Helping the future of your company or business be as close to what you want it to be. Thinking about all the possibilities and promising opportunities. With more than 5 years of experience developing Web pages and applications. Managing multiple cutting-edge technologies to streamline web development, e-commerce and much more