Answer the question
In order to leave comments, you need to log in
How to run jQuery function via javascript?
Hello!
Please tell me if it is possible to run a function written in jQuery through javascript. There is a code (below) that should perform some action when the phone moves, I need it to start the animation on jQuery. Please tell me how to do it. Or is it possible to write this code through jQuery?
function init()
{
if (window.DeviceOrientationEvent) {
window.addEventListener("deviceorientation", function(event)
{
// надо что-то написать {
}
}, true);
} else {
alert("Sorry, your browser doesn't support Device Orientation");
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question