File: /var/www/concertium.com/public_html/wp-content/themes/dt-the7/js/atoms/forms.js
/* #Comment form
================================================== */
// jQuery(document).ready(function($) {
var $commentForm = $('#commentform');
$commentForm.on('click', 'a.clear-form', function (e) {
e.preventDefault();
$commentForm.find('input[type="text"], textarea').val('');
if($(".contact-form-material").length > 0){
$commentForm.find('input[type="text"], textarea').parent().removeClass("is-focused");
};
return false;
});
$commentForm.on('click', ' a.dt-btn.dt-btn-m', function(e) {
e.preventDefault();
$commentForm.find('#submit').trigger('click');
return false;
});
if ($.browser.msie) {
$('input[type="text"][placeholder], textarea[placeholder]').each(function () {
var obj = $(this);
if (obj.attr('placeholder') != '') {
obj.addClass('IePlaceHolder');
if ($.trim(obj.val()) == '' && obj.attr('type') != 'password') {
obj.val(obj.attr('placeholder'));
}
}
});
$('.IePlaceHolder').focus(function () {
var obj = $(this);
if (obj.val() == obj.attr('placeholder')) {
obj.val('');
}
});
$('.IePlaceHolder').blur(function () {
var obj = $(this);
if ($.trim(obj.val()) == '') {
obj.val(obj.attr('placeholder'));
}
});
}