/[svn]/doc/tmpl/js/preview.js
ViewVC logotype

Annotation of /doc/tmpl/js/preview.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2737 - (hide annotations) (download) (as text)
Tue Apr 28 15:02:07 2015 UTC (9 years ago) by schoenebeck
File MIME type: application/javascript
File size: 875 byte(s)
- Added CSS and JS for previewing an article on a local machine.

1 schoenebeck 2737 /*
2     CrudeDoc Java Script (for previewing an article on a local machine)
3     Copyright (c) 2015 Christian Schoenebeck. All rights reserved.
4     http://www.crudebyte.com
5     */
6    
7     function crdLoadScript(url) {
8     var head = document.getElementsByTagName("head")[0];
9     var script = document.createElement("script");
10     script.type = "text/javascript";
11     script.src = url;
12     head.appendChild(script);
13     }
14    
15     function crdDetectFeatures() {
16     if ($.support["transform"]) {
17     $("body").addClass("hasTransform");
18     }
19     }
20    
21     $(function() {
22     crdLoadScript("jquery-1.11.2.js");
23     crdLoadScript("jquery-ui.js");
24     crdLoadScript("jquery.transform2d.js");
25    
26     crdDetectFeatures();
27     $(document).tooltip();
28     $("img[caption]").each(function() {
29     $(this).after(
30     "<div class='imgcptn'>" +
31     $(this).attr("caption") + "</div>"
32     );
33     });
34     });

  ViewVC Help
Powered by ViewVC