$(function() { $("#news_select input").button(); $(".select").attr("checked", "checked").button("refresh"); $(".type_photos").hide(); $("#news_select input").click(function() { if( $(".type_" + this.id).is(":visible") ) { $(".type_" + this.id).hide("slow"); } else { $(".type_" + this.id).show("slow"); } }); }); function lookup(inputString) { if(inputString.length == 0) { $('#suggestions').hide(); } else { $.post("https://www.montagne-cool.com/modules/accueil/js/../../../autocompletion.php?niv=3&auto=topos", {queryString: ""+inputString+""}, function(data) { if(data.length >0) { $('#suggestions').show(); $('#suggestions').corner(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); }