javascript - Increase the height of JSignature input area - Stack Overflow

I am using JSignature to accept the signature. How can i increase the default height? I tried giving he

I am using JSignature to accept the signature. How can i increase the default height? I tried giving height to the signature div but not working as expected.

Code:
<div id="signature" style="background-color:#fff9cb;border:0px;height:200px"></div>

How to fix this?

I am using JSignature to accept the signature. How can i increase the default height? I tried giving height to the signature div but not working as expected.

Code:
<div id="signature" style="background-color:#fff9cb;border:0px;height:200px"></div>

How to fix this?

Share Improve this question asked May 21, 2014 at 6:44 user3554548user3554548 852 silver badges7 bronze badges 2
  • I am using github./willowsystems/jSignature to capture the signature. The Html code is mentioned above to add the Jsignature canvas element. It takes the height dynamically based on screen width and height. I would like to increase the height to 200px. – user3554548 Commented May 21, 2014 at 6:51
  • Any idea on how to fix this. – user3554548 Commented May 21, 2014 at 7:56
Add a ment  | 

3 Answers 3

Reset to default 3

replace this line in jSignature Sample

var $sigdiv = $("#signature").jSignature({ 'UndoButton': true })

to

var $sigdiv = $("#signature").jSignature({ 'UndoButton': true, 'width': 400, 'height': 400 })

I've had trouble altering the size or the line width of the signature box in <div> (capture) and <img> (display) tags. Try modifying the size with jQuery (and make sure you have jSignature.js added to your project):

<div id="mySignatureBox" style="background:#000000; color:#ffffff"></div>   

$('#mySignatureBox').jSignature({ lineWidth: 1, width: 700, height: 200 });

It seems you can also use percentage values, this did the job for me:

$('#signature').jSignature({
  width: '100%',
  height: 250
});

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744145989a4560424.html

相关推荐

  • javascript - Increase the height of JSignature input area - Stack Overflow

    I am using JSignature to accept the signature. How can i increase the default height? I tried giving he

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信