Ich benötige ein jQuery-Skript, das erkennt, ob ein Element eine bestimmte Klasse hat, und eine Aktion wie "Position ändern" ausführt.
Dies ist der Weg, aber ich glaube nicht, dass dies funktionieren wird.
$("a.contact").toggle(function() {
$("#contact").animate({
right: '0'
}, 2000);
if ($("#about").hasClass("opened")) {
$("#about").animate({
right: -700 + "px"
}, 2000);
}
}, function() {
$("#contact").animate({
right: -700 + "px"
}, 2000);
});