You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
982 B

$(document).ready(function(){
$('.toggle').click(function(){
$(this).parent().next().toggle();
return false;
});
$('.check').click(function(){
var $input = $(this).prev();
if ($input.is(':checked')){
$input.prop('checked', false);
$input.parent().next().find('input').prop('checked', false);
}
else{
$input.prop('checked', true);
$input.parent().next().find('input').prop('checked', true);
}
return false;
});
$("input:checkbox[name='europa'] ").change(function(){
var $this = $(this);
if ($this.is(':checked')){
$.get(
"/admin/service/get_city/",
{'id': $(this).val()},
function(j){
$this.parent().after(j);
console.log($this);
});
}
else{
$this.parent().next().remove();
}
})
});