Commit 66cc5c75004955ff41cfe86d30f2b2985f4d0698
Fixing iteration over xpath and where for highlights
| | | | 51 | backdrop: false, | 51 | backdrop: false, |
---|
52 | }); | 52 | }); |
---|
53 | $('.well a').click(function(event){ | 53 | $('.well a').click(function(event){ |
---|
54 | xpath = $(event.currentTarget).text().split('#')[1]; | | xpath = $(event.currentTarget).text().split('#')[1]; |
---|
| | 54 | if($(event.currentTarget).text().search('#')){ | | | 55 | len = $(event.currentTarget).text().split('#').len(); |
---|
| | 56 | xpath = $(event.currentTarget).text().split('#')[len-1]; |
---|
| | 57 | } |
---|
| | 58 | else |
---|
| | 59 | xpath = $(event.currentTarget).text(); |
---|
55 | var nodes = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE,null); | 60 | var nodes = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE,null); |
---|
56 | result = nodes.iterateNext(); | 61 | result = nodes.iterateNext(); |
---|
57 | while(result){ | 62 | while(result){ |
---|