When you compare the structure of both libraries:
YUI:
YAHOO.util.Dom.setStyle(['test', 'test2'], 'opacity', 0.5);
var opacity = YAHOO.util.Dom.getStyle('test2', 'opacity');
and jQuery:
$("#test, #test2").css("opacity", 0.5);
var opacity = $("#test2").css("opacity");
They look pretty similar.
Thus, the overall flow of the script should be approximately the same with both libraries.
, , . , jQuery , , , .