+ 4
Moving image
Is there any way i can move the given code image, when i took my finger anywhere https://sololearn.com/compiler-playground/Wfcg4f0pz70A/?ref=app
60 Respuestas
+ 7
Pablo🚀 here is a working draggable... i use draggables in other codes like my chess game.
https://sololearn.com/compiler-playground/Wdl9bx33d8DB/?ref=app
https://sololearn.com/compiler-playground/W8Cgtsj4ZA1k/?ref=app
https://sololearn.com/compiler-playground/W2RiuYsGYPl4/?ref=app
+ 6
Asking repeatedly for users to follow you is NOT on topic tranquillite and directing your conversation on Ushasi Bhattacharya is NOT on topic as he has mentioned as well.
+ 5
tranquillite please follow the forum guidelines. Stay on topic as this is
Pablo🚀 's question / thread, not yours.
+ 4
BroFar okay
+ 4
Guys please DO Not spam... Spam gets reported and can lead to loss of privileges on the app including loss of account.
tranquillite
ying
Rosh
+ 4
Well, tranquillite, BroFar Sir is not going out of topic when he reminds those, who treat defiance of the rules as fun and games, that they are neither clever nor amusing. Sir is pointing out the obvious, that those who think that disobeying the rules is clever, are only exposing their ignorance and lack of discipline.
Rules exist for order, not for your personal entertainment, and there will always be consequences for those too arrogant or foolish to grasp that.
If you believe defiance makes you significant, you are mistaken; it actually highlights your inability to rise above childish antics.
Please follow the community guidelines.
+ 3
Okay, look:
...
<img id="albert">
...
// js code
let img = document.getElementById("albert");
img.style.position = "absolute";
img.style.top = 2 + "px"; // or any
img.style.left = 58 + "px";
+ 3
Pablo🚀 , what you can do is trigger an animation on hover that creates a moving effect, albeit along a predefined path.
Here's one approach:
https://sololearn.com/compiler-playground/WwUFdwhCdj01/?ref=app
+ 3
Hello, Diligent Dceasso! Welcome to Sololearn!
Sololearn is a SELF-LEARNING platform which offers several courses.
Consider availing the C++ courses provided here:
https://www.sololearn.com/learn/courses/c-plus-plus-introduction
(Introduction)
https://www.sololearn.com/learn/courses/c-plus-plus-intermediate
(Intermediate)
However, if you have any question, face any probelm while coding, have a confusion or don't understand, feel free to reach out to the Sololearn community. Feel free to post appropriate questions in the Q&A Discussions forum to get constructive help from others.You may also get helpful feedback and suggestions for enhancements on the the codes you publicly post here.
Consider refering to other resources available on the internet, such as:
https://www.w3schools.com/cpp/
https://www.geeksforgeeks.org/cpp/c-plus-plus/
https://www.codecademy.com/learn/learn-c-plus-plus
https://www.learncpp.com/
https://learn.microsoft.com/en-us/cpp/cpp/?view=msvc-170
Thank you for reaching out. Keep coding!
+ 3
Zvi
When a developer wants to implement their own custom drag-and-drop behavior using JavaScript, they'll often set draggable="false" on the default elements to prevent conflicts with the browser's built-in behavior. This gives them full control over how the dragging and dropping works.
+ 3
draggable = true doesn't always work from browser to browser
+ 3
ying, Rosh , the Question and Answer forum, as the name suggests, is for discussing code-related problems and solutions.
Please further note that asking people to follow you, be it in the comments section or the discussion forum, goes against the community guidelines.
Kindly abide by the community guidelines.
I understand that you are new users and may not be knowing about the guidelines. Hence, I hereby take this opportunity to let you know that, if you do not follow the guidelines, your accounts may be reported.
Thank you.
+ 3
Ushasi Bhattacharya Do you are incredible? 🤣🤌
+ 2
use javascript
+ 2
not working vro Elnior Loreh
+ 2
Pablo🚀 , CSS cannot read the mouse or finger position in real-time. Therefore, it cannot track the mouse or finger position dynamically rather, it can only respond to predefined interactions, like :hover, :focus, etc. or CSS animations.
You cannot make an image follow a finger or cursor anywhere on the screen using only CSS. To move an element dynamically following a touch, JavaScript is required.
+ 2
Pablo🚀 checkout
+ 2
BroFar why did you set draggable=“false”? Is that to override the default behavior? If so why?
+ 2
BroFar i thought so but can you be more specific about why you would want to reinvent a wheel when there is a built attribute for this. In other words what builtin behavior do you want to override and fix.