Last active
February 14, 2017 19:31
-
-
Save Phoenix23A/5dd555e0cab37d4c589a1d519814e129 to your computer and use it in GitHub Desktop.
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
$(document).ready(function(){ | |
// your code goes here | |
}); | |
$(document).ready(function(){ | |
alert("Document is ready!"); | |
}); | |
$(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 | |
$.stellar(); | |
// Tooltips | |
$(function () { | |
$('[data-toggle="tooltip"]').tooltip(); | |
}); | |
//textarea background | |
!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(){ | |
$("#button").on("click", function() { | |
var comment = $('.message-box').val(); | |
$('#visible-comment').html(comment); | |
$('.message-box').hide(); | |
return false; | |
}); | |
// 2.7 Excercise Starts here | |
$(".message-box").on("keyup", function() { | |
console.log("keyup happened"); //here we make sure we're catching the keyup | |
// in here is where the rest of our code for this Exercise will go | |
}); | |
$(".message-box").html(charCount); //here we show a running character count to the user | |
if(charCount > 50) { | |
$(".message-box").css("color", "red"); | |
} else { | |
// need it to be black | |
}; | |
// End of 2.7 Excercise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment