Skip to content

Instantly share code, notes, and snippets.

@joel-extremo
Last active September 1, 2018 23:01
Show Gist options
  • Save joel-extremo/db84208d57cb332d050ca21fbf92c427 to your computer and use it in GitHub Desktop.
Save joel-extremo/db84208d57cb332d050ca21fbf92c427 to your computer and use it in GitHub Desktop.
2.7: Introduction to jQuery
$(function () {
// tootip
$('#item1').tooltip()
$('[data-toggle="tooltip"]').tooltip()
//change the color to the textarea
$('#message-box').css('background-color', 'lightgray')
// form submit
$('#submit-btn').on('click', function() {
var comment = $('#message-box').val()
var textMessage = '<b>Your message was:</b> ' + comment
$('#contact-form').hide()
$('#form h3').text('Thanks for send a message to Bugs Bunny')
$('#visible-comment').html(textMessage)
return false
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment