基于Jquery的拖拽
时间:2008-05-03 来源:tiger_big
首先解决prototype和jquery冲突问题
1.prototype.js一定要放jquery前面
2.
//var jQuery=$;
jQuery.noConflict();
需要文件interface和jquery
相关
API
标题[-]
《谎》DEMO版
《Exam》水晶石作品
JS:
function drag_drop() {
jQuery('a.closeE1').bind('click', toggleContent);
jQuery('div.container').Sortable(
{
accept: 'block',
helperclass: 'sortHelper',
activeclass : 'sortableactive',
hoverclass : 'sortablehover',
handle: 'div.itemHeader',
tolerance: 'pointer',
onChange : function(ser)
{
},
onStart : function()
{
jQuery.iAutoscroller.start(this, document.getElementsByTagName('body'));
},
onStop : function()
{
jQuery.iAutoscroller.stop();
}
}
);
}
var toggleContent = function(e)
{
var targetContent = jQuery('div.itemContent', this.parentNode.parentNode);
if (targetContent.css('display') == 'none') {
targetContent.slideDown(300);
jQuery(this).html('[-]');
} else {
targetContent.slideUp(300);
jQuery(this).html('[+]');
}
return false;
};
CSS:
相关阅读 更多 +
排行榜 更多 +