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'));
var zIndex = 0;
function make_draggable(elements)
{
/* Elements is a jquery object: */
elements.draggable({
snap:true,
containment:'parent',
start:function(e,ui){ ui.helper.css('z-index',++zIndex); },
stop:function(e,ui){
/* Sending the z-index and positon of the note to update_position.php via AJAX GET: */
$.get('ajax/update.php',{
x : ui.position.left,
y : ui.position.top,
id : ui.helper.attr('id')
});
}
});
}
});