sintonia/airtime_mvc/public/js/airtime/preferences/preferences.js

24 lines
639 B
JavaScript

function showErrorSections() {
if($("#soundcloud-settings .errors").length > 0) {
$("#soundcloud-settings").show();
$(window).scrollTop($("#soundcloud-settings .errors").position().top);
}
if($("#livestream-settings .errors").length > 0) {
$("#livestream-settings").show();
$(window).scrollTop($("#livestream-settings .errors").position().top);
}
}
$(document).ready(function() {
$('.collapsible-header').live('click',function() {
$(this).next().toggle('fast');
$(this).toggleClass("close");
return false;
}).next().hide();
showErrorSections();
});