大佬教程收集整理的这篇文章主要介绍了Jquery UI Accordion获得可排序的ID,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是该版本的小提琴:http://jsfiddle.net/DHCaA/
我想做的很简单.例如(使用那个小提琴)如果我移动第2部分下面的第1部分,我怎样才能获得切换位置的部分的ID.我需要那些ID,@R_891_9447@对我的模型进行一些计算和更改.
手风琴中的每个元素都是动态创建的,我可以创造我想要的任何东西.例如:
<div id ="first-1" class="group">
这是第一次入境ID.
任何的想法?
$( "#accordion" ) .accordion({ header: "> div > h3",collapsible: true }) .sortable({ axis: "y",handle: "h3",stop: function( event,ui ) { var items=[]; ui.item.siblings().andSelf().each(function(){ //compare data('index') and the real index if($(this).data('index')!=$(this).index()){ items.push(this.id); } }); // IE doesn't register the blur when sorTing // so trigger focusout handlers to remove .ui-state-focus ui.item.children( "h3" ).triggerHandler( "focusout" ); if(items.length)alert(items.join(',')); ui.item.parent().trigger('stop'); } }).on('stop',function(){ $(this).children().each(function(i){$(this).data('index',i)}); }).trigger('stop');
以上是大佬教程为你收集整理的Jquery UI Accordion获得可排序的ID全部内容,希望文章能够帮你解决Jquery UI Accordion获得可排序的ID所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。