Advertisement
downloadtaky

preview.js

Mar 24th, 2011
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     jQuery(document).ready(function () {
  2.         jQuery("#$zona1y").change(function() {// if a user changed the y-Axis
  3.             check_preview_refresh();
  4.             }
  5.         );
  6.         jQuery("#$zona1x").change(function() {// if a user changed the x-Axis
  7.             check_preview_refresh();
  8.             }
  9.         );
  10.     });
  11.  
  12.     function check_preview_refresh(){
  13.         if (jQuery("#zona1y").val() != '' && jQuery("#zona1x").val() != '' ){
  14.             jQuery.ajax({
  15.                 type: "post",url: "admin-ajax.php",data: { action: 'site_preview', _ajax_nonce: '<?php echo $nonce; ?>' },
  16.                 success: function(html){
  17.                     jQuery("#themepreview").html(html);
  18.                     jQuery("#themepreview").show();
  19.                 }
  20.             });
  21.         }
  22.     }
  23. // Zona2
  24. jQuery(document).ready(function () {
  25.         jQuery("#$zona2y").change(function() {// if a user changed the y-Axis
  26.             check_preview_refresh();
  27.             }
  28.         );
  29.         jQuery("#$zona2x").change(function() {// if a user changed the x-Axis
  30.             check_preview_refresh();
  31.             }
  32.         );
  33.     });
  34.  
  35.     function check_preview_refresh(){
  36.         if (jQuery("#zona2y").val() != '' && jQuery("#zona2x").val() != '' ){
  37.             jQuery.ajax({
  38.                 type: "post",url: "admin-ajax.php",data: { action: 'site_preview', _ajax_nonce: '<?php echo $nonce; ?>' },
  39.                 success: function(html){
  40.                     jQuery("#themepreview").html(html);
  41.                     jQuery("#themepreview").show();
  42.                 }
  43.             });
  44.         }
  45.     }
  46. // Zona 3
  47. jQuery(document).ready(function () {
  48.         jQuery("#$zona3y").change(function() {// if a user changed the y-Axis
  49.             check_preview_refresh();
  50.             }
  51.         );
  52.         jQuery("#$zona3x").change(function() {// if a user changed the x-Axis
  53.             check_preview_refresh();
  54.             }
  55.         );
  56.     });
  57.  
  58.     function check_preview_refresh(){
  59.         if (jQuery("#zona3y").val() != '' && jQuery("#zona3x").val() != '' ){
  60.             jQuery.ajax({
  61.                 type: "post",url: "admin-ajax.php",data: { action: 'site_preview', _ajax_nonce: '<?php echo $nonce; ?>' },
  62.                 success: function(html){
  63.                     jQuery("#themepreview").html(html);
  64.                     jQuery("#themepreview").show();
  65.                 }
  66.             });
  67.         }
  68.     }
  69. //Zona 4
  70. jQuery(document).ready(function () {
  71.         jQuery("#$zona4y").change(function() {// if a user changed the y-Axis
  72.             check_preview_refresh();
  73.             }
  74.         );
  75.         jQuery("#$zona4x").change(function() {// if a user changed the x-Axis
  76.             check_preview_refresh();
  77.             }
  78.         );
  79.     });
  80.  
  81.     function check_preview_refresh(){
  82.         if (jQuery("#zona4y").val() != '' && jQuery("#zona4x").val() != '' ){
  83.             jQuery.ajax({
  84.                 type: "post",url: "admin-ajax.php",data: { action: 'site_preview', _ajax_nonce: '<?php echo $nonce; ?>' },
  85.                 success: function(html){
  86.                     jQuery("#themepreview").html(html);
  87.                     jQuery("#themepreview").show();
  88.                 }
  89.             });
  90.         }
  91.     }
  92. //Zona 5
  93. jQuery(document).ready(function () {
  94.         jQuery("#$zona5y").change(function() {// if a user changed the y-Axis
  95.             check_preview_refresh();
  96.             }
  97.         );
  98.         jQuery("#$zona5x").change(function() {// if a user changed the x-Axis
  99.             check_preview_refresh();
  100.             }
  101.         );
  102.     });
  103.  
  104.     function check_preview_refresh(){
  105.         if (jQuery("#zona5y").val() != '' && jQuery("#zona5x").val() != '' ){
  106.             jQuery.ajax({
  107.                 type: "post",url: "admin-ajax.php",data: { action: 'site_preview', _ajax_nonce: '<?php echo $nonce; ?>' },
  108.                 success: function(html){
  109.                     jQuery("#themepreview").html(html);
  110.                     jQuery("#themepreview").show();
  111.                 }
  112.             });
  113.         }
  114.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement