我使用的聯繫表格7插件,我想大約有文字box.So邊境,我已經改變了script.js
這是includes>JS
文件夾周圍輸入字段邊界。聯繫表7驗證:
前:
$.fn.wpcf7NotValidTip = function(message) {
return this.each(function() {
var $into = $(this);
$into.find('span.wpcf7-not-valid-tip').remove();
$into.append('<span role="alert" class="wpcf7-not-valid-tip">' + message + '</span>');
if ($into.is('.use-floating-validation-tip *')) {
$('.wpcf7-not-valid-tip', $into).mouseover(function() {
$(this).wpcf7FadeOut();
});
$(':input', $into).focus(function() {
$('.wpcf7-not-valid-tip', $into).not(':hidden').wpcf7FadeOut();
});
}
});
};
後:
$.fn.wpcf7NotValidTip = function(message) {
return this.each(function() {
var $into = $(this);
$into.find('span.wpcf7-not-valid-tip').remove();
$into.append('<span role="alert" class="wpcf7-not-valid-tip">' + message + '</span>');
$into.find(':input').css('border-color', 'red');//it will add red color border
if ($into.is('.use-floating-validation-tip *')) {
$('.wpcf7-not-valid-tip', $into).mouseover(function() {
$(this).wpcf7FadeOut();
$into.find(':input').removeAttr('style'); //for removing red color
});
$(':input', $into).focus(function() {
$('.wpcf7-not-valid-tip', $into).not(':hidden').wpcf7FadeOut();
$into.find(':input').removeAttr('style');//for removind red color
});
}
});
};
問題:在驗證的時候它顯示validation.But我填補了該領域,它應該刪除邊框顏色。所以,一旦我填滿了所有的東西,我怎麼能去掉那種顏色。所以任何人都可以告訴我我錯過了什麼或者應該添加什麼?
爲什麼人們更感興趣的是唐氏票,而不是給解決方案? 我的問題很清楚,我想要達到的目標,我也提供了代碼.. – Twix 2014-10-29 08:09:18
爲什麼編輯.js?你不能用css改變邊框嗎? ''border','box-shadow'和'outline'是查看輸入邊框等的主要'元兇'... – 2014-10-29 08:45:46
@Rohil_PHPBeginner這是什麼意思? – Twix 2014-10-29 09:10:53