/* #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(''); 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')); } }); }