- wip trying to patch jquery url validator
- resolve conflict in addition of multiple vars and ajax function
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
console.log("-------------EXAMPLEEEEE----------------- :)");
|
||||
console.log("PLGNTLS_data:");
|
||||
console.log(PLGNTLS_data);
|
||||
|
||||
|
||||
20
plugins/fipfcard_plugin/js/jquery_validator_patch.js
vendored
Normal file
20
plugins/fipfcard_plugin/js/jquery_validator_patch.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
console.log("-------------jquery----------------- :)");
|
||||
// https://stackoverflow.com/questions/24938890/wordpress-jquery-noconflict
|
||||
// https://wordpress.stackexchange.com/questions/104510/how-to-add-jquery-script-to-an-individual-page
|
||||
// https://developer.wordpress.org/reference/functions/wp_enqueue_script/#jQuery_noConflict_Wrappers
|
||||
//(function($) {
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
|
||||
$.validator.addMethod
|
||||
(
|
||||
'validUrl',
|
||||
function(value, element)
|
||||
{
|
||||
var url = $.validator.methods.url.bind(this);
|
||||
return url(value, element) || url('http://' + value, element);
|
||||
},
|
||||
'Please enter a valid URL'
|
||||
);
|
||||
|
||||
} );
|
||||
//})(jQuery);
|
||||
Reference in New Issue
Block a user