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.
30 lines
863 B
30 lines
863 B
$(document).ready(function(){
|
|
|
|
$('.on').click(function(){
|
|
var url = $(this).attr('href')
|
|
var $this = $(this)
|
|
$.get(
|
|
url, function(data){
|
|
if (data == 'on'){
|
|
$this.hide();
|
|
$this.siblings('.off').show();
|
|
}
|
|
});//end get
|
|
return false;
|
|
});
|
|
|
|
$('.off').click(function(){
|
|
var url = $(this).attr('href')
|
|
var $this = $(this)
|
|
$.get(
|
|
url, function(data){
|
|
if (data == 'off'){
|
|
$this.hide();
|
|
$this.siblings('.on').show();
|
|
}
|
|
}
|
|
)
|
|
return false;
|
|
});
|
|
|
|
});
|
|
|