$(document).ready(function(){ $('body').append('
'); $('#menu-bar').prepend($('#city-menu')); $('#city').append('

Quelle ville pour la meteo ?


Enregistrer'); $('#city-menu').fancybox({ 'zoomSpeedIn' : 600, 'zoomSpeedOut' : 500, 'easingIn' : 'easeOutBack', 'easingOut' : 'easeInBack', 'hideOnContentClick': false, 'padding' : 15 }); $('#city-submit').live('click', function(){ var ville = $('#cityChoice').val(); if(ville != '' || ville != null){ $.get('ajax/update.php', {id:'weather', city: ville}, function(msg){ location.reload(); }); }else{ $('#city').append('City can\'t be empty.'); } }); var tmp; /* A helper function for converting a set of elements to draggables: */ make_draggable($('#weather')); });