Difference between revisions of "MediaWiki:Common.js"

From Halon, SMTP software for hosting providers
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: Any JavaScript here will be loaded for all users on every page load.: $(document).ready(functio...")
 
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
 
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
$(document).ready(function() {
 
$(document).ready(function() {
 
   // Price
 
   // Price
   if ($("#price-lite").length > 0) {
+
   if ($("#price-user-25").length > 0) {
 
         $.ajax({
 
         $.ajax({
 
                 url: "/price.php",
 
                 url: "/price.php",

Revision as of 07:31, 7 October 2013

/* Any JavaScript here will be loaded for all users on every page load. */
$(document).ready(function() {
  // Price
  if ($("#price-user-25").length > 0) {
        $.ajax({
                url: "/price.php",
                dataType: "json",
                success: function(result) {
                        $("#price-user-25").text("$" + result["VSP-0"]);
                        $("#price-25").text("$" + (25 * result["VSP-0"] * 12);
                        $("#price-user-50").text("$" + result["VSP-50"]);
                        $("#price-50").text("$" + (25 * result["VSP-50"] * 12);
                },
        });
  }
});