4 // _all modules only reference dependencies
5 angular.module('JQueryEmu', [])
7 // Factory is a singleton and share its context within all instances.
8 .factory('JQemu', function () {
10 // JQueryLight cannot search a tag within ancestrors
11 var parent = function (element, selector) {
13 var search = selector.toUpperCase();
15 if (search === parent[0].tagName) {
17 } // HTMLDivElement properties
18 parent = parent.parent();
22 // JQueryLight cannot search by type
23 var findByType= function (element, selector) {
24 var search = selector.toLowerCase();
25 var children = element.children();
27 if (search === children[0].type) {
29 } // HTMLDivElement properties
30 children = children.next();
36 findByType: findByType