Home › Forums › Quform WordPress › Jquery Deprecated Code issues › Reply To: Jquery Deprecated Code issues
thank you so much for your help. I was able to get the signature section of form to work but I have lost the roll over function on the “Clear” and the grey shaded box showing where the signature block is. its now just white space.
here is my code. Can you tell me what i am doing wrong?
<label style=”font-style: normal; color: #454545; font-size: 14px; font-weight: 600; text-transform: uppercase; font-family: Montserrat,Sans-serif;”>
Signature <span style=”color: #f26f20;”>*</span></label>
<style>.signature-pad canvas {<br /> margin-top: 5px;<br /> border: 2px solid #e1e1e3;<br /> }<br /> .signature-clear {<br /> width: 300px;<br /> text-align: left;<br /> margin-top: -8px;<br /> font-size: 11px;<br /> color: #737373;<br /> cursor: pointer;<br /> }<br /> .iphorm_5_218-element-wrap label, .iphorm_5_218-element-wrap .iphorm-input-wrap, .iphorm_5_218-element-wrap .iphorm-swfupload, .iphorm_5_218-element-wrap .iphorm-description {<br /> display: none !important;<br /> }<br /></style>
<div class=”signature-pad”>
<canvas width=”300″ height=”150″></canvas>
<div class=”signature-clear”>Clear</div>
<input name=”signature” type=”hidden” />
</div>
<script src=”https://martindaleco.com/wp-content/plugins/martindale-extras/assets/js/signature_pad.min.js”></script>
<script>
jQuery(function ($) {
jQuery(‘.signature-pad’).each(function () {
var root = jQuery(this),
clear = root.find(‘.signature-clear’),
canvas = root.find(‘canvas’)[0],
output = root.find(‘input[name=”signature”]’),
signaturePad;
signaturePad = new SignaturePad(canvas, {
minWidth: 0.25,
maxWidth: 2,
onEnd: function () {
output.val(signaturePad.toDataURL());
}
});
clear.click(function() {
signaturePad.clear();
output.val(”);
});
});
});
</script>