first commit
This commit is contained in:
67
WebRoot/node_modules/jquery-backstretch/examples/click.html
generated
vendored
Normal file
67
WebRoot/node_modules/jquery-backstretch/examples/click.html
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<style>
|
||||
body { font-family: Helvetica, Arial, sans-serif; line-height: 1.3em; -webkit-font-smoothing: antialiased; }
|
||||
.container {
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
background-color: #FFF;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
pre { border: 1px solid #CCC; background-color: #EEE; color: #333; padding: 10px; overflow: scroll; }
|
||||
code { padding: 2px 4px; background-color: #F7F7F9; border: 1px solid #E1E1E8; color: #D14; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Click Demo</h1>
|
||||
<p>This demonstrates a commonly-asked question: how do I replace Backstretch's image once it's been called? The simple answer is, you can just call Backstretch again, and the image will be replaced.</p>
|
||||
<p><em>Note: Any options that you previously passed in will be preserved.</em></p>
|
||||
<p>
|
||||
<input type="button" id="pot-holder" value="Show Pot Holder Background" />
|
||||
<input type="button" id="coffee" value="Show Coffee Background" />
|
||||
</p>
|
||||
<pre><script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
||||
<script src="jquery.backstretch.min.js"></script>
|
||||
<script>
|
||||
$.backstretch("pot-holder.jpg", {speed: 500});
|
||||
|
||||
$("#pot-holder").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.backstretch("pot-holder.jpg");
|
||||
});
|
||||
|
||||
$("#coffee").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.backstretch("coffee.jpg");
|
||||
});
|
||||
</script></pre>
|
||||
</div>
|
||||
<script src="../libs/jquery/jquery.js"></script>
|
||||
<script src="../src/jquery.backstretch.js"></script>
|
||||
<script>
|
||||
$.backstretch("pot-holder.jpg", {fade: 500});
|
||||
|
||||
$("#pot-holder").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.backstretch("pot-holder.jpg");
|
||||
});
|
||||
|
||||
$("#coffee").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.backstretch("coffee.jpg");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user