jquery - On scroll video pause and play with javascript code -
After
I can stop writing jQuery code and play a video. Here I have used the embed
tag (the video
tag) is working in Firefox but not in Chrome.
jquery (document) .ready (function () {jQuery (document) .scroll (function () {jQuery ("login content .wonderplugingallery") .Each (function (index) { Var ETOP = jQuery ('Access content .html5gallery-container -' '+ index) .offset (top); Topy = ETOP - jQuery (window) .scrollTop ();; if (Topy> 80 & amp; & Lt; 340) {jQuery ("html5gallery-container -." + Index + ".html5gallery-video-play -" + index ") .trigger (" click on "); jQuery (" html5gallery - Container - "+ index +" .html5boxPlayPause .html5boxPlay ") trigger (" click ");} else {jQuery (". Html5gallery- container - "+ index +" .html5box PlayPause .html5boxPause ".) Trigger (" click on ");}});});});
code in this link and see for example live
Parent = Video; While (parents and parents! == document.body) {x + = parent.offsetLeft; Y + = parent.offsetTop; Parents = parent.offsetParent;}
Comments
Post a Comment