kavun / jquery.waitForElement

A jQuery plugin that resolves a jQuery Deferred Promise if an element is found by ID before a threshold time limit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery.waitForElement

Build Status Dependency Status devDependency Status

jQuery plugin that resolves a jQuery Deferred Promise if an element is found by ID before a threshold timeout. Returns the element if it is found.

$.waitForElement('test-id', 5000 /* 5 sec */).done(function (element) {
	// found and returned element with id of 'test-id'
}).fail(function () {
	// element does not exist before threshold time limit
});

About

A jQuery plugin that resolves a jQuery Deferred Promise if an element is found by ID before a threshold time limit

License:MIT License


Languages

Language:JavaScript 98.5%Language:CSS 1.5%