Canvas (Dynamic) Signature using jQuery

Many times we want to need to the dynamic signature of the client so this article help us.

Design:-




Source code:-
<%@ Page Language="C#" AutoEventWireup="true" CodeFile=" CanvasSignature.aspx.cs"
    Inherits="CanvasSignature" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script src="http://intridea.github.io/sketch.js/lib/sketch.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('#colors_sketch').sketch();
            $(".tools a").eq(0).attr("style", "color:#000");
            $(".tools a").click(function () {
                $(".tools a").removeAttr("style");
                $(this).attr("style", "color:#000");
            });
           
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <fieldset style="width: 500px;">
        <legend>Canvas Signature using JQuery
 </legend>
        <div class="tools">
            <a href="#colors_sketch" data-tool="marker">Marker</a> <a href="#colors_sketch" data-tool="eraser">
                Eraser</a>
        </div>
        <br />
        <canvas id="colors_sketch" width="500" height="200">
</canvas>
    
    </fieldset>
    </form>
</body>
</html>



Canvas (Dynamic) Signature using jQuery Canvas (Dynamic) Signature using jQuery Reviewed by NEERAJ SRIVASTAVA on 9:48:00 PM Rating: 5

No comments:

Powered by Blogger.