Assuming the HTML has <div> elements with the class section, the only other thing I can see that you would need to do is wrap item in a jQuery object.
$(".fadeall").dblclick(function() {
$("div.section").each(function(idx,item) {
// Wrapped "item" so you have access to jQuery methods
$(item).fadeTo(25,inactiveOpacity);
});
});
Since item is the DOM element, it needs to be wrapped with a jQuery object so that it will have access to methods like .fadeTo().
Another approach is to use this in the .each(), which will refer to the DOM element as well.
$(".fadeall").dblclick(function() {
$("div.section").each(function() {
// Wrapped "this" so you have access to jQuery methods
$(this).fadeTo(25,inactiveOpacity);
});
});
EDIT:
Also, make sure the DOM is loaded before your code runs:
// Wrapping code like this ensures that the DOM elements will be
// loaded before your code runs.
$(function() {
$(".fadeall").dblclick(function() {
$("div.section").each(function() {
// Wrapped "this" so you have access to jQuery methods
$(this).fadeTo(25,inactiveOpacity);
});
});
});
This is a shortcut for jQuery's .ready() method, which will ensure that your code doesn't run until the elements are available.