Jquery draggable not working in chrome/safari

Posted by jbatson on Stack Overflow See other posts from Stack Overflow or by jbatson
Published on 2010-06-17T21:49:16Z Indexed on 2010/06/17 21:53 UTC
Read the original article Hit count: 287

Filed under:
|

I have created a page that uses ajax calls to load product images. The jquery code for drag, drop and clone would not work when in the index.php page so I moved it to the page that gets called to request the products as each product has drag, drop code created for it.

Works fine in FF, even IE but not in Safari or Chrome. Below is the jquery code in load_products.php that gets created when the ajax call is made to load the products.

http://tandyleatherfactory.net/

Anyone have any idea why wouldn't work in Safari?

$(function() {$("#concho_4_2").draggable({ helper: 'clone', cursor: 'pointer', zIndex: '1001', stop: function(event, ui) { offsetElement = $(ui.helper).offset(); offNewContainer = $('#belts').offset();

    var dataId = $(ui.helper).attr('id');

    ajaxRequest('http://tandyleatherfactory.net/includes/ahah/add_product.php', 'product=4', '#conchos');

    var randomnumber = Math.floor(Math.random()*1000000);
    var newId = 'concho_4_2_'+randomnumber;

    $(ui.helper).clone(true).removeAttr('id').attr('id',newId).css("left", offsetElement.left-offNewContainer.left-10).css("top", offsetElement.top-offNewContainer.top-10).appendTo('#belts');                     
    $('#'+newId).draggable();                
}

});

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui