add comments add a div with paypal-donate class in order to wrap up the paypal donate section
MehrabKamrani

MehrabKamrani commited on 2015-12-26 07:25:13
Zeige 1 geänderte Dateien mit 18 Einfügungen und 8 Löschungen.

... ...
@@ -20,10 +21,11 @@
20 21
             </blockquote>
21 22
           </div>
22 23
 
23
-        </div>
24
-      </div>
25
-    </div>
24
+        </div><!-- container -->
25
+      </div><!-- row -->
26
+    </div><!-- quote-section -->
26 27
 
28
+    <div class="paypal-donate">
27 29
       <div class="container">
28 30
         <div class="row">
29 31
           <div class="col-sm-7">
... ...
@@ -92,6 +94,7 @@
92 94
                 <h4><a href="<page donate/donate-options>">Other Ways to Donate</a></h4>
93 95
               </div>
94 96
               
97
+              <!-- PAYPAL ESSENTIAL INPUTS -->
95 98
               <input type="hidden" id="amount" name="amount" value="">
96 99
               <input type="hidden" id="a3" name="a3" value="0">
97 100
               <input type="hidden" id="p3" name="p3" value="1">
... ...
@@ -106,14 +109,15 @@
106 109
               <input type="hidden" name="cancel_return" value="https://www.torproject.org/getinvolved/volunteer">
107 110
 
108 111
             </form>
109
-        </div>
110
-      </div>
111
-    </div>
112
+          </div><!-- donate-section -->
113
+        </div><!-- row -->
114
+      </div><!-- container -->
115
+    </div><!-- paypal-donate -->
116
+    
117
+  </div><!-- donation -->
112 118
 
113
-  </div>
114 119
 
115 120
 
116
-  <!-- PAYPAL -->
117 121
   <script type="text/javascript" src="$(DOCROOT)/js/jquery.min.js"></script>
118 122
   <script type="text/javascript">
119 123
   function displayVals() {
... ...
@@ -140,6 +144,8 @@
140 144
       $(".error-msg").css("display","none");
141 145
     });
142 146
 
147
+
148
+    // Perks functionality
143 149
     if (23 <= parseInt($("#amount").val()) && parseInt($("#amount").val()) < 100) {
144 150
       $("#stickers").css("opacity","1");
145 151
       $("#tshirt").css("opacity","0.5");
... ...
@@ -165,6 +171,8 @@
165 171
     $("#exampleInputAmount").change(displayVals);
166 172
     displayVals();
167 173
     
174
+
175
+    // Paypal donate validation when changing other amount input 
168 176
     $("#exampleInputAmount").change(function(){
169 177
       if ($("#amount").val() == "" || parseInt($("#amount").val()) < 5) {
170 178
         $(".error-msg").css("display","block");
... ...
@@ -173,6 +181,7 @@
173 181
       }
174 182
     });
175 183
 
184
+    // Paypal donate validation when clicking on donate button 
176 185
     $("#donate-btn").click(function(event){
177 186
       if ($("#amount").val() == "" || parseInt($("#amount").val()) < 5) {
178 187
         event.preventDefault();
... ...
@@ -182,6 +191,8 @@
182 191
       }
183 192
     });
184 193
 
194
+
195
+    // monthly or one-time donate functionality
185 196
     $(".left").click(function(){
186 197
       $(".left").addClass('active');
187 198
       $(".right").removeClass('active');
188 199