Changeset 1526623
- Timestamp:
- 11/02/2016 11:36:05 AM (9 years ago)
- Location:
- boxrunner/trunk
- Files:
-
- 2 edited
-
ichain.php (modified) (2 diffs)
-
public/js/boxrunner-public.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
boxrunner/trunk/ichain.php
r1525951 r1526623 31 31 32 32 add_action( 'wp_enqueue_scripts', 'wp_bxr_my_theme_enqueue_styles' ); 33 33 add_action('init','ava_test_init'); 34 function ava_test_init() { 35 wp_enqueue_script( 'boxrunner-public', plugins_url( '/public/js/boxrunner-public.js', FILE )); 36 } 34 37 function wc_bxr_get_shipping_methods(){ 35 38 $wc_bxr_token=wc_bxr_getiChain_token_auth(); … … 864 867 } 865 868 ?> 866 867 <script type="text/javascript">868 869 function verify(){870 var key=document.getElementById('consumer-secret').value;871 var value=document.getElementById('consumer-key').value;872 if(key.length>10 && value.length >10){873 document.getElementById('submit-key').disabled = false;874 }else{875 document.getElementById('submit-key').disabled = true;876 }877 }878 </script> -
boxrunner/trunk/public/js/boxrunner-public.js
r1440629 r1526623 1 (function( $ ) { 2 'use strict'; 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note: It has been assumed you will write jQuery code here, so the 9 * $ function reference has been prepared for usage within the scope 10 * of this function. 11 * 12 * This enables you to define handlers, for when the DOM is ready: 13 * 14 * $(function() { 15 * 16 * }); 17 * 18 * When the window is loaded: 19 * 20 * $( window ).load(function() { 21 * 22 * }); 23 * 24 * ...and/or other possibilities. 25 * 26 * Ideally, it is not considered best practise to attach more than a 27 * single DOM-ready or window-load handler for a particular page. 28 * Although scripts in the WordPress core, Plugins and Themes may be 29 * practising this, we should strive to set a better example in our own work. 30 */ 31 32 })( jQuery ); 1 function verify(){ 2 var key=document.getElementById('consumer-secret').value; 3 var value=document.getElementById('consumer-key').value; 4 if(key.length>10 && value.length >10){ 5 document.getElementById('submit-key').disabled = false; 6 }else{ 7 document.getElementById('submit-key').disabled = true; 8 } 9 }
Note: See TracChangeset
for help on using the changeset viewer.