el1.func1();
setTimeout(el2.func2.bind(el2), 3000);
console.log(getElement(207).name);
function getElement (value) {
var x;
arr.some(function (element, index, array) {
if (element.id == value) {
x = element;
return true;
}
return false;
});
return x;
}
<video data-type="video" type="video/mp4" src="/data/NFL.1.mp4" autoplay controls></video>
$(function (e) {
$('[data-type="video"]').on('play', function () {
var video = this;
setTimeout(function () {
video.pause();
}, 5000);
});
});
$('[data-type="video"]').on('timeupdate', function () {
if (this.currentTime > 5) {
this.pause();
}
});
<img
src="data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw
AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz
ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp
a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl
ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis
F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH
hhx4dbgYKAAA7"
alt="Larry" />
Provides access to all elements with an id. This is a legacy non-standard interface, you should use the Document.getElementById() method instead.
function inIframe () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}