Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (37 sloc) 1.6 KB
<html>
<head>
<title>Bacon Ipsum jQuery Plugin Sample</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="http://cdn.baconipsum.com/api/jquery-BaconIpsum.js"></script>
</head>
<body>
<img src="https://baconipsum.com/wp-content/uploads/2011/06/bacon-ipsum-banner1.jpg" alt="Bacon Ipsum" />
<br/>
<h1>jQuery Plugin Samples</h1>
<div style="font-size: 0.8em;">View source, you know you want to :) </div>
<h2>Default options</h2>
<h4>$('#default').BaconIpsum(); Three paragrahps of meat and filler starting with Bacon ipsum dolor sit amet</h4>
<div id="default"></div>
<br/>
<h2>Custom options</h2>
<h4>$('#custom').BaconIpsum({ type:'all-meat', paras:5, start_with_lorem:false }); Five paragrahps of just meat</h4>
<div id="custom"></div>
<br/>
<h2>One sentence</h2>
<h4>$('#one-sentence').BaconIpsum({ type:'meat-and-filler', start_with_lorem:true, sentences:1 });</h4>
<div id="one-sentence"></div>
<h2>No tags</h2>
<h4>$('#one-sentence').BaconIpsum({ type:'meat-and-filler', start_with_lorem:true, paras:1, no_tags: true });</h4>
<div id="no-tags"></div>
<br/>
<script type="text/javascript">
$(document).ready(function()
{
$('#default').BaconIpsum();
$('#custom').BaconIpsum({ type:'all-meat', paras:5, start_with_lorem:false });
$('#one-sentence').BaconIpsum({ type:'meat-and-filler', start_with_lorem:true, sentences:1 });
$('#no-tags').BaconIpsum({ type:'meat-and-filler', start_with_lorem:true, paras:1, no_tags: true });
});
</script>
</body>
</html>