#5396 closed bug (fixed)
Docs: Broken Examples
Reported by: | Jörn Zaefferer | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.8.1 |
Component: | [meta] ui.docs | Version: | 1.8 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
See eg. http://docs.jquery.com/UI/API/1.8/Button
The two examples there are both broken. Firebug has this:
{{{missing ) after argument list [Break on this error] }catch(e){}});}}}
This script that rewrites the embedded script for the iframe source seems to have a bug:
source = source 80 // IE needs to wait for the script to load (?) 81 .replace("$(document).ready(function(){", "window.onload = (function(){try{") 82 .replace(/}\);\s*<\/sc/, "}catch(e){}});</sc") 83 //.replace("http://code.jquery.com/jquery-latest.js", "http://code.jquery.com/jquery-1.3rc2.js") 84 .replace("</head>", "<style>html,body{border:0; margin:0; padding:0;}</style></head>");
It inserts the catch-line, but not the try.
Change History (4)
comment:1 follow-up: 2 Changed 13 years ago by
comment:2 Changed 13 years ago by
Replying to kswedberg:
Oh, one other thing: I removed the document ready block because I put the script near the closing body tag.
Here is the URL to the script on api.jquery.com:
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
John fixed the script on mediawiki.
comment:4 Changed 13 years ago by
Milestone: | 1.9 → 1.8.1 |
---|
Note: See
TracTickets for help on using
tickets.
I had the same problem on api.jquery.com. I got things working by replacing those regex replaces with this:
I think removing the comments helped.