Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (34 sloc) 1.494 kb
<!doctype html>
<html>
<head>
<title>Shepherding jQuery fetched from an external domain</title>
<script type="text/javascript" src="../../build/shepherd.dev.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/shepherd-config">
{
modularize: 'jQuery',
noGlobal: ['jQuery', '$']
}
</script>
<script type="harmony" data-src="./main.js"></script>
<style type="text/css">
body {padding: 0;margin:0;position:fixed;top:0;bottom:0;left:0;right:0}
.info {border-bottom: 3px solid orange;background: #FFD39B;text-align: center;font-size: 1.05em;padding-top: 5px;}
.info pre {text-align:left;width: 500px; margin: 0 auto;background-color: #DDD;padding: 5px 20px;border: 1px solid #999;}
</style>
</head>
<body>
<div class='info'>
<b>Note</b>: This demo fetches jQuery from a CDN.<br />
Shepherd allows to securize the code from external domain by turning them into modules. <br />
To do so for jQuery, the following lines added to the header of your page are enough: <br /><br />
<pre>&lt;script type="harmony"&gt;
{
modularize: 'jQuery',
noGlobal: ['jQuery', '$']
}
&lt;/script&gt;</pre><br /><br />
</div>
<p>Expected output: A gear falling to the bottom of the page</p>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.