/** * if it is moved away and invisible, first hide it then removing the class will restore it to its position and finally show it, add any effects in the show(). * otherwise: * if visible first hide it add any effects here finish this first and then apply the rest, adding the class "moved" will move it out of view then make it visible again for the search engines */ function move(id){ $(id).hide(0, function(){$(id).addClass('moved').show();}); } function unMove(id){ $(id).hide().removeClass('moved').show(0);} function toggleMove(id){ ($(id).hasClass('moved')) ? unMove(id) : move(id); } function updcourse(){ code = $('#Servicio_a_consultar option:selected').val(); txt = $('#Servicio_a_consultar option:selected').text(); if (code == txt) { txt = ''; }else{ txt = ' - '+txt; } $('#selected_course').val(code+txt); $("#Convenio_Marco").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); } function updmarco(){ code = $('#Convenio_Marco option:selected').val(); txt = $('#Convenio_Marco option:selected').text(); if (code == txt) { txt = ''; }else{ txt = ' - '+txt; } $('#selected_course').val(code+txt); $("#Servicio_a_consultar").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); } function nonsence(){ code = $('#non-sence option:selected').val(); txt = $('#non-sence option:selected').text(); if (code == txt) { txt = ''; }else{ txt = ' - '+txt; } $('#selected_course').val(code+txt); $("#Servicio_a_consultar").attr('selectedIndex', '-1').find("option:selected").removeAttr("selected"); }