Skip to content

Multiple jqScribble and save function don't work properly #2

@okwei

Description

@okwei

function saveB() will be called twice in the following code. saveA is not called at all.

<body>

<div id="a"></div>
<div id="b"></div>

<button id="test">test</button>
</body>

<script>
    function saveA(){
        alert('saveA');
    }
    function saveB(){
        alert('saveB');
    }    
    $('#a').jqScribble({
        width: 640,
        height: 200,
        saveFunction: saveA
    });
    $('#b').jqScribble({
        width: 640,
        height: 200,
        saveFunction: saveB
    });

    $('#test').on('click', function(){
        $('#a').data('jqScribble').save(); 
        $('#b').data('jqScribble').save();
    });   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions