小编Zor*_*rba的帖子

拖放不能在Firefox中工作

我已经在JQuery和html5中实现了拖放功能,它在chrome中工作得很好,但在Firefox中保留了以下是我的代码,我警告丢弃图像的ID,在Firefox中显示为未定义,以下是我的代码,请帮忙.jsfiddle:http://jsfiddle.net/rajutikale/2R6p8/

视图:

<!-- dragable image --> 
<a href="#?w=976" rel="popup1" id="<?=$album['album_id'].'-'.$data->content_id?>" class="poplight album_photos"><img  id="<?=$album['album_id'].'-'.$data->content_id?>" draggable="true" ondragstart="drag(event)" ondragover="allowDrop(event)" alt="" src="<?=$imagePath?>"></a>

<input type="hidden" id="<?='wall'.$data->content_id?>" value="<?=$data->wall_id?>" />
<input type="hidden" id="<?='type'.$data->content_id?>" value="<?=$data->content_type?>" />
<input type="hidden" id="<?='user'.$data->content_id?>" value="<?=$_SESSION['user_type']?>" />

<!-- dropable area -->
<div class="" style="z-index: 1; position:fixed; right:124px; top:60px" id="div1" ondrop="drop(event);;" ondragover="allowDrop(event);"> <a href="#"><img id="dropzon_image"src="<?php echo IMAGE_PATH_HTTP?>babbler_btn.jpg" alt="" border="0" style="cursor: pointer; cursor: hand; "/></a>
    <div id="overlay" style="display:none;z-index: 2;  position:fixed; right:0px; top:32px; cursor: pointer;border-color: blueviolet;">
        <img id="drop_image" src="<?php echo IMAGE_PATH_HTTP?>drop_image.jpg" alt="" border="1" style="cursor: …
Run Code Online (Sandbox Code Playgroud)

javascript jquery html5 drag-and-drop

11
推荐指数
2
解决办法
1万
查看次数

标签 统计

drag-and-drop ×1

html5 ×1

javascript ×1

jquery ×1