Make copies of clone element in jquery

I have a input which has some functionality on it. In some case I am receiving a array which contains predefined input value then I have to append that input list using that array. The the problem is only one input field is created.

    $('.row input').click(function() {
        alert(0)
    })

    var data = $('#myList').clone(true);
    $('.row').remove()

    var list = ['car', 'axe', 'gold'];
    $.each(list, function(i, val) {
        $('#myList').prepend(data.find('input').val(val))
    })

Note: Also the functionality which is attached to input is defined somewhere in another js file and I could not change it. It would break other pages


Download make.copies.of.clone.element.in.jquery.zip
Direct Link


Download


Download make.copies.of.clone.element.in.jquery.zip
Mediafire


Download


Download make.copies.of.clone.element.in.jquery.zip
Filecore


Download


Download make.copies.of.clone.element.in.jquery.zip
Depositfiles


Download


Download make.copies.of.clone.element.in.jquery.zip
Bayfiles


Download

Both comments and pings are currently closed.

Comments are closed.