我有一些简单的图像滑块,我做了。我有一个小图片列表,每当其中一个被点击时,我就用点击替换目标大图片的源(+一些用src操作从服务器获得大图片)。
现在我想在小图像上点击淡出大图像,当新图像加载时淡入。
使用此代码进行了尝试:
ul.find('img').click(function() {
$('#big_image')
.fadeOut()
.attr('src', this.src.replace('/small/', '/big/')) // Some other s
我有一个简单的视频标签
<video id="video_html" width="320" height="240" controls>
<source src="" type="video/mp4">
Your browser does not support the video tag.
</video>
我在运行时添加url
$("#video_html").attr('src','...a.mp4');
它不能在a
使用 of JQuery验证,我将手动将错误添加到表单中:
var errors = {};
errors['Field1'] = 'Field1 has an error';
errors['Field2'] = 'Field2 has an error';
errors['Field3'] = 'Field3 has an error';
$('form').validate().showErrors(errors);
为什么我不能使用$('form').vali