Created
April 29, 2016 18:51
-
-
Save khazelton77/147b29ff5d05bfb557190bb712bb2f37 to your computer and use it in GitHub Desktop.
JavaScript file with #message-box background-color changed and user input in contact-form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk')); | |
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs'); | |
$(document).ready(function() { | |
// Smooth Scrolling // | |
var $root = $('html, body'); | |
$('.navbar-nav a').click(function() { | |
var href = $.attr(this, 'href'); | |
$root.animate({ | |
scrollTop: $(href).offset().top | |
}, 500, function () { | |
window.location.hash = href; | |
}); | |
return false; | |
}); | |
// Stellar // | |
$("#about").stellar(); | |
$("#faq").stellar(); | |
$(function() { | |
$("#item1").tooltip(); | |
}); | |
//Tooltip | |
$(function () { | |
$('[data-toggle="tooltip"]').tooltip(); | |
}); | |
}); | |
//Textarea background color// | |
$("#message-box").css("background-color", "#b3ffb3"); | |
//Message Box Comment // | |
$("#contact-button").on("click", function() { | |
var comment=$("#message-box").val(); | |
console.log(comment); | |
$("#visible-comment").html("Thank you for commenting!"); | |
$("#message.box").hide(); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment