diff options
Diffstat (limited to 'docs/src/templates')
| -rw-r--r-- | docs/src/templates/doc_widgets.js | 10 | ||||
| -rw-r--r-- | docs/src/templates/index.html | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/docs/src/templates/doc_widgets.js b/docs/src/templates/doc_widgets.js index 5516da26..c995857c 100644 --- a/docs/src/templates/doc_widgets.js +++ b/docs/src/templates/doc_widgets.js @@ -25,9 +25,11 @@ this.descend(true); //compile the example code element.hide(); - var example = element.find('pre.doc-source').eq(0), + //jQuery find() methods in this widget contain primitive selectors on purpose so that we can use + //jqlite instead. jqlite's find() method currently supports onlt getElementsByTagName! + var example = element.find('pre').eq(0), //doc-source exampleSrc = example.text(), - scenario = element.find('pre.doc-scenario').eq(0); + scenario = element.find('pre').eq(1); //doc-scenario var code = indent(exampleSrc); var tabHtml = @@ -47,7 +49,7 @@ '</ul>'; var tabs = angular.element(tabHtml); - tabs.find('li.doc-example-source > pre').text(HTML_TEMPLATE.replace('_HTML_SOURCE_', code.html)); + tabs.find('li').eq(1).find('pre').text(HTML_TEMPLATE.replace('_HTML_SOURCE_', code.html)); element.html(''); element.append(tabs); @@ -55,7 +57,7 @@ var script = (exampleSrc.match(/<script[^\>]*>([\s\S]*)<\/script>/) || [])[1] || ''; try { - eval(script); + window.eval(script); } catch (e) { alert(e); } diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 7e9eac0f..79c6a07c 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -75,8 +75,8 @@ <div id="footer">© 2010-2011 AngularJS</div> </div> - <script src="jquery.min.js"></script> <script src="syntaxhighlighter/syntaxhighlighter-combined.js"></script> + <-- jquery place holder --> <script src="../angular.min.js" ng:autobind></script> <script src="docs-combined.js"></script> <script src="docs-keywords.js"></script> |
