Skip to content

Instantly share code, notes, and snippets.

@tehfedaykin
Created June 16, 2013 00:35
Show Gist options
  • Save tehfedaykin/5790195 to your computer and use it in GitHub Desktop.
Save tehfedaykin/5790195 to your computer and use it in GitHub Desktop.
functionality - carlyfying
$(document).ready(function(){
$('#add-contact').on('click', function(){
var email = $('#contact').val();
console.log(email);
$.ajax({
url: "/hook/create?filter_from="+ email,
}).success(function() {
$('#current-flags').append('<li>'+ email + '</li>');
});
});
$('#carly-mode').on('click', function(){
if($(this).hasClass('btn-success')){
$('body').css({'background': '#ffffff', 'font-family' : 'Raleway'});
$('.well, .header').css({'background': '#f5f5f5', 'border-bottom': '#fff'});
$('.logo').css('background-position', '0px 0px');
$(this).removeClass('btn-success').text('off');
$('#carly').animate({
bottom: -250
}, 300);
}
else{
$('body').css({'background': '#fbdce5', 'font-family' : 'Clicker Script'});
$('.well, .header').css({'background': '#e3869b', 'border-bottom': '#c58d9e'});
$('.logo').css('background-position', '0px -75px');
$(this).addClass('btn-success').text('on');
$('#carly').animate({
bottom: 0
}, 300);
$('#concerts span').animate({
//left: -2000
}, 10000);
}
});
$('#active-mode').on('click', function(){
if($(this).hasClass('btn-success')){
$(this).removeClass('btn-success').text('off');
}
else{
$(this).addClass('btn-success').text('on');
}
});
// $.ajax({
// url: "/carlyradio",
// }).success(function(obj) {
// console.log(obj);
// });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment