Posts Tagged ‘Feed ShowZ’

Advanced Scriplaculous Sortable Demo Fix

Monday, April 20th, 2009

Heh.

There is a good example of using nested Scriplaculous Sortables. With one little flaw – Scriplaculous ver 1.6.x is used, and when you try to execute the code with newer version of library – sections.each is not a function error pops up.

Here is the way to fix it – you’ll probably need it if you want to save the results :-D

Just replace “document.getElementsByClassName(‘section’);” to “$$(‘.section’);”

Before

function getGroupOrder() {
	var sections = document.getElementsByClassName('section');
	var alerttext = '';
	sections.each(function(section) {
		var sectionID = section.id;
		var order = Sortable.serialize(sectionID);
		alerttext += sectionID + ': ' + Sortable.sequence(section) + '\n';
	});
	alert(alerttext);
	return false;
}

After

function getGroupOrder() {
	var sections = $$('.section');
	var alerttext = '';
	sections.each(function(section) {
		var sectionID = section.id;
		var order = Sortable.serialize(sectionID);
		alerttext += sectionID + ': ' + Sortable.sequence(section) + '\n';
	});
	alert(alerttext);
	return false;
}

Then modify it for your needs and go on )

What was that?
Quote:

As of Prototype 1.6, document.getElementsByClassName has been deprecated since native implementations return a NodeList rather than an Array.

Popularity: 31% [?]

Ad RotateZ & Feed ShowZ now online

Thursday, February 15th, 2007

I checked both for WP 2.1 compatibility, they works.

Now files is available to download. Have fun!
Ad RotateZ plugin homepage
Feed ShowZ plugin homepage

Popularity: 11% [?]

Feed ShowZ plugin for WordPress 2.x

Thursday, February 15th, 2007

Hmmm.
I started a new plugin – Feed ShowZ.
You can see homepage here: Feed ShowZ plugin.

Popularity: 10% [?]


Switch to our mobile site