Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Set onload handler via jquery, use local doc pages for preview

  • Loading branch information...
commit fa63741ab30f9e9f7a87b5748320134e7638601f 1 parent 2a4db39
Kristi authored

Showing 2 changed files with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. +2 3 beta/jstest-tmpl.js
  2. +1 1  index.html
5 beta/jstest-tmpl.js
@@ -123,7 +123,7 @@ function doQuery() {
123 123 console.log(showArr.length);
124 124 var links = $("#links").jqotesub("#link-template", showArr);
125 125 if (showArr.length >= 1) {
126   - links.children().first().jqoteapp("#ref-template", showArr[0]);
  126 + links.children().first().jqoteapp("#ref-template", showArr[0]).find("iframe").load(hackFocus);
127 127 }
128 128 console.log("done");
129 129 return false;
@@ -138,9 +138,8 @@ function initDataFilename() {
138 138 }
139 139 }
140 140
141   -function hackFocus() {
  141 +function hackFocus(e) {
142 142 window.scrollTo(0, 0);
143   - //$("#search").focus();
144 143 }
145 144
146 145 $(function() {
2  index.html
@@ -87,7 +87,7 @@ <h1 class="header">Command Py</h1>
87 87 <a href="http://docs.python.org/2.7/<%= this.href %>" title="<%= this.title %>" data-score="<%= this.score %>"><%= this.highlighted %></a><br/>
88 88 </script>
89 89 <script id="ref-template" type="text/html">
90   - <div class="ref"><iframe onload="hackFocus()" src="http://docs.python.org/2.7/<%= this.href %>" ></iframe></div>
  90 + <div class="ref"><iframe src="2.7/<%= this.href %>" ></iframe></div>
91 91 </script>
92 92
93 93 <script src="beta/jquery-1.7.2.js"></script>

0 comments on commit fa63741

Please sign in to comment.
Something went wrong with that request. Please try again.