forked from olton/metroui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrating.php
81 lines (72 loc) · 3.24 KB
/
rating.php
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
72
73
74
75
76
77
78
79
80
81
<? include("header.php")?>
<div class="page secondary">
<div class="page-header">
<div class="page-header-content">
<h1>Rating<small>demo</small></h1>
<a href="/" class="back-button big page-back"></a>
</div>
</div>
<div class="page-region">
<div class="page-region-content">
<div class="grid">
<div class="row">
<div class="span10">
<h2>Big stars</h2>
<h3>Static</h3>
<div>
<div class="rating" data-role="rating" data-param-vote="off" data-param-rating="3.7" id="rating1">
</div>
</div>
<br />
<pre class="prettyprint linenums span10">
<div class="rating" data-role="rating" data-param-vote="off" data-param-rating="3.7">
</div>
</pre>
<h3>Static small</h3>
<div>
<div class="rating small" data-role="rating" data-param-vote="off" data-param-rating="3" data-param-stars="6" id="rating2">
</div>
</div>
<br />
<pre class="prettyprint linenums span10">
<div class="rating small" data-role="rating" data-param-vote="off" data-param-rating="3" data-param-stars="6">
</div>
</pre>
<h3>Rating</h3>
<div>
<div class="rating" data-role="rating" id="rating3"></div>
</div>
<br />
<pre class="prettyprint linenums span10">
<div class="rating" data-role="rating">
</div>
</pre>
<h3>Rating small</h3>
<div>
<div class="rating small" data-role="rating" data-param-rating="4" id="rating4">
</div>
</div>
<br />
<pre class="prettyprint linenums span10">
<div class="rating small" data-role="rating" data-param-rating="4">
</div>
</pre>
<p>
For use this rating you must include <code>rating.js</code> in <code>head</code> of you page
</p>
<h3>Methods</h3>
<ul class="unstyled">
<li>$('#rating1').RatingValue(val) //set rating value</li>
<li>$('#rating1').RatingValue() // get rating value</li>
<li>$('#rating1').RatingPercents(val) // set rating value in percents</li>
<li>$('#rating1').RatingPercents() // get rating value in precents</li>
<li>$('#rating3').RatingVote('on') // set rating mode VOTE</li>
<li>$('#rating3').RatingVote('off') // set rating mode READONLY</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<? include("footer.php")?>