在图像上添加和拼版图像

时间:2015-09-25 14:53:43

标签: jquery html css

我想为我的图片添加选项自定义如果我点击添加艺术我想从弹出窗口添加小图片这是工作,但我不是在图像上看到。在我的脚本中已经有div之前的图片和div之后的附加图片。

http://finance.usermd.net/customizer/index.html

$(function() {
    $("#img-0").click(function () {

        $("<div src='art/art1.png' id='img-add-0'></div>").insertBefore('.img-board').draggable();
    });

    $("#img-1").click(function () {
        $('.image').append("<div src='art/art2.png' id='img-add-0'></div>").draggable();
    });
    $("#img-2").click(function () {
        $('.image').append("<div src='art/art3.png' id='img-add-0'></div>").draggable();
    });
    $('#img-0').hover(function() {
        $(this).css('cursor','pointer');
    });
    $('#img-1').hover(function() {
        $(this).css('cursor','pointer');
    });
    $('#img-2').hover(function() {
        $(this).css('cursor','pointer');
    });
    $('#testdragable').draggable();
})

CSS

.popup-box {
    background: #265a88;
}

#img-add-0 {
    position: absolute;
    width: 150px;
    height: 150px;
}
#img-2 {
    background-color: #265a88;
}

0 个答案:

没有答案