POPUP使用bpopup.min.js,easing.min.js和FORM VALIDATION usnig semantic.min.js无法一起工作 [英] POPUP using bpopup.min.js , easing.min.js and FORM VALIDATION usnig semantic.min.js are not able to work together

查看:75
本文介绍了POPUP使用bpopup.min.js,easing.min.js和FORM VALIDATION usnig semantic.min.js无法一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我想解释一下我想要做什么。我使用semantic.min.js和semantic.js制作了一个包含所有验证的注册表单,然后使用bopup.min.js和easing.min.js制作了一个pop,并且jquery也被包含在所有这些中。我想在点击时弹出注册表单,弹出窗口正常,但验证无效。我努力了,但由于缺乏知识,我无法弄清楚问题。下面是一些代码部分

< script src =js / jquery.min.jstype =text / javascript>< / script>

< script src =js / jquery.bpopup.min.jstype =text / javascript>< / script>

< script src =js / jquery.easing.min.jstype =text / javascript>< / script>

< script type =text / javascriptsrc =exterfilesForvalidation / formValidation .js>< / script>

< script type =text / javascriptsrc =exterfilesForvalidation / semantic.min.js>< / script>

< script type =text / javascriptsrc =exterfilesForvalidation / semantic.js>< / script>

验证码的某些部分位于

< script type =text / javascript>

$(document).ready(function(){

//生成一个简单验证码

函数randomNumber(min,max){

返回Math.floor(Math.random()*(max - min + 1)+ min);

};

$('#captchaOperation')。html([randomNumber(1,20),'+',randomNumber(1,20),'=']。 join(''));



$('#horizo​​ntalForm')。formValidation({

framework:'semantic',

图标:{

有效:'checkmark icon',

无效:'删除图标',

验证:'刷新图标',

反馈:'fv-control-feedback'

},

字段:{

fullName:{

行:'。small-6',

验证器:{

notEmpty:{

消息:'全名需要'

},

弹出代码在下面

< script type =text / javascript>

; (函数($){

$(函数(){

var $ p1 = $('#signinArea'),

$ p2 = $('#registerArea');

// i = 0;



$('body')。on('click ','。小',函数(e){

e.preventDefault();

var popup = $(this).hasClass('signin-link') ?$ p1:$ p2,

content = $('。content'),

self = $(this);



popup.bPopup(self.data('bpopup')|| {});

});



});

})(jQuery);



< / script>

我上传了所有文件链接http://www.filedropper.com/bpopup

First of all I want to explain what I am trying to do. I have made a registration form with all the validations using semantic.min.js and semantic.js then I made a pop using bopup.min.js and easing.min.js and also jquery is being included in all these. I want to pop up registration form on click and the popup is woking properly but the validation is not working. I tried hard but due to lack of knowledge I was not able to figure out the problem. Below is some code portions
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.bpopup.min.js" type="text/javascript"></script>
<script src="js/jquery.easing.min.js" type="text/javascript"></script>
<script type="text/javascript" src="exterfilesForvalidation/formValidation.js"></script>
<script type="text/javascript" src="exterfilesForvalidation/semantic.min.js"></script>
<script type="text/javascript" src="exterfilesForvalidation/semantic.js"></script>
some portion of validation code is below
<script type="text/javascript">
$(document).ready(function () {
// Generate a simple captcha
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
};
$('#captchaOperation').html([randomNumber(1, 20), '+', randomNumber(1, 20), '='].join(' '));

$('#horizontalForm').formValidation({
framework: 'semantic',
icon: {
valid: 'checkmark icon',
invalid: 'remove icon',
validating: 'refresh icon',
feedback: 'fv-control-feedback'
},
fields: {
fullName: {
row: '.small-6',
validators: {
notEmpty: {
message: 'The full name is required'
},
popup code is below
<script type="text/javascript">
; (function ($) {
$(function () {
var $p1 = $('#signinArea'),
$p2 = $('#registerArea');
// i = 0;

$('body').on('click', '.small', function (e) {
e.preventDefault();
var popup = $(this).hasClass('signin-link') ? $p1 : $p2,
content = $('.content'),
self = $(this);

popup.bPopup(self.data('bpopup') || {});
});

});
})(jQuery);

</script>
I have uploaded all the files at link http://www.filedropper.com/bpopup

推荐答案

(文件).ready(function(){

//生成一个简单的验证码

函数randomNumber(min,max){

返回Math.floor(Math.random()*(max - min + 1)+ min);

};
(document).ready(function () {
// Generate a simple captcha
function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
};


('#captchaOperation')。html([randomNumber(1,20),'+',randomNumber(1,20),'=']。join(''));


('#captchaOperation').html([randomNumber(1, 20), '+', randomNumber(1, 20), '='].join(' '));


('#horizo​​ntalForm')。formValidation({

framework:'semantic',

icon: {

有效:'checkmark icon',

无效:'删除图标',

验证:'刷新图标',

反馈:'fv-control-feedback'

},

字段:{

fullName:{

行:'。small-6',

验证人:{

notEmpty:{

消息:'全名是必需的'

},

弹出代码在下面

< script type =text / javascript>

; (功能(
('#horizontalForm').formValidation({
framework: 'semantic',
icon: {
valid: 'checkmark icon',
invalid: 'remove icon',
validating: 'refresh icon',
feedback: 'fv-control-feedback'
},
fields: {
fullName: {
row: '.small-6',
validators: {
notEmpty: {
message: 'The full name is required'
},
popup code is below
<script type="text/javascript">
; (function (


这篇关于POPUP使用bpopup.min.js,easing.min.js和FORM VALIDATION usnig semantic.min.js无法一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆