forked from sonukry/jcalculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (66 loc) · 4.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!doctype>
<html>
<head>
<title>jCalculator</title>
<meta property="og:title" content="jCalculator">
<meta property="og:description" content="Awesome jQuery plugin for calculator inputs">
<meta property="og:image" content="px/og_img.jpg">
<meta property="og:image:type" content="image/jpeg">
<link rel="stylesheet" type="text/css" href="style.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/jcalculator.css" media="screen">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,900,100' rel='stylesheet' type='text/css'>
</head>
<body>
<a href="https://github.com/balajmarius" style="position: absolute; top: 0; right: 0; border: 0;z-index:9999;"><img src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="header">
<img src="px/icon.png" />
<h1>jCalculator</h1>
<h2>Awesome jQuery plugin for calculator inputs</h2>
<a href="http://mariusbalaj.com/dev/jcalculator/jcalculator.zip">Download</a>
</div>
<div class="container" id="content">
<h2>How to install</h2>
<p>1. Include the following files before <span class="code">body</span> tag close.</p>
<p class="sublime">
<span class="w"><</span><span class="p">link</span> <span class="g">href</span><span class="w">=</span>"path_to/jcalculator.css" <span class="g">rel</span><span class="w">=</span>"stylesheet" <span class="g">type</span><span class="w">=</span>"text/css"<span class="w">></span><br>
<span class="comment"><-- jQuery library --></span><br>
<span class="w"><</span><span class="p">script</span> <span class="g">type</span><span class="w">=</span>"text/javascript" src="path_to/jquery.js"<span class="w">></</span><span class="p">script</span><span class="w">></span><br>
<span class="w"><</span><span class="p">script</span> <span class="g">type</span><span class="w">=</span>"text/javascript" src="path_to/jcalculator.min.js"<span class="w">></</span><span class="p">script</span><span class="w">></span>
</p>
<p>2. Call the <span class="code">jCalculator</span> plugin.</p>
<p class="sublime">
<span class="w"><</span><span class="p">script</span> <span class="g">type</span><span class="w">=</span>"text/javascript"<span class="w">></span> <br>
<span class="padding"><span class="p">$</span><span class="w">(</span>'#yourInput'<span class="w">).calculator();</span><br>
<span class="w"></</span><span class="p">script</span><span class="w">></span>
</span></p>
</div>
<div class="demonstration">
<div class="container">
<h2>Demonstration</h2>
<input id="testinput" type="text" placeholder="click here to see the magic" />
</div>
</div>
<div class="container" id="share">
<h2>Spread the good word.</h2>
<a class="fb" onclick="return popitup('https://www.facebook.com/sharer/sharer.php?u=http://mariusbalaj.com/dev/jcalculator/')" href="https://www.facebook.com/sharer/sharer.php?u=http://mariusbalaj.com/dev/jcalculator/"><img src="px/fb.svg" /></a>
<a class="tw" onclick="return popitup('https://twitter.com/share')" href="https://twitter.com/share" class="twitter-share-button" data-lang="en"><img src="px/tw.svg" /></a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<a class="gplus" onclick="return popitup('https://plus.google.com/share?url=http://mariusbalaj.com/dev/jcalculator/')" href="https://plus.google.com/share?url=http://mariusbalaj.com/dev/jcalculator/"><img src="px/gplus.svg" /></a>
</div>
<div class="footer">
© 2014 - jCalculator is brought to you by <a href="http://duckygo.com" target="_blank">Adrian Valentin Dan</a> and <a href="http://mariusbalaj.com">Balaj Marius</a>.
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="js/jcalculator.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$('#testinput').calculator();
});
function popitup(url) {
newwindow=window.open(url,'name','height=300,width=600');
if (window.focus) {newwindow.focus()}
return false;
}
</script>
</body>
</html>