PHP Classes

File: assets/js/sortable.js

Recommend this page to a friend!
  Classes of Goffy G  >  wgGallery  >  assets/js/sortable.js  >  Download  
File: assets/js/sortable.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: wgGallery
Image gallery module for XOOPS CMS
Author: By
Last change:
Date: 2 years ago
Size: 1,259 bytes


Class file image Download
// Jquery function for order fields
// When the page is loaded define the current order and items to reorder
$(document).ready( function(){
/* script for sortable list */
	var ns = $('ol.sortable').nestedSortable({
		forcePlaceholderSize: true,
		handle: 'div',
		helper:	'clone',
		items: 'li',
		opacity: .6,
		placeholder: 'placeholder',
		revert: 250,
		tabSize: 25,
		tolerance: 'pointer',
		toleranceElement: '> div',
		maxLevels: 10,
		isTree: true,
		expandOnHover: 700,
		startCollapsed: false,
		excludeRoot: true,

	$('.disclose').on('click', function() {

/* Call the container items to reorder fields */
  $( function() {
    $( "ol.sortable" ).nestedSortable({
			update: function(event, ui) {
				var list = $(this).nestedSortable( 'serialize');
				$.post( 'albums.php?op=order', list );
			receive: function(event, ui) {
				var list = $(this).nestedSortable( 'serialize');                    
				$.post( 'albums.php?op=order', list );                      
    $( "ol.sortable" ).disableSelection();
  } );
For more information send a message to info at phpclasses dot org.