Forms

From rbachwiki
Revision as of 17:40, 26 December 2016 by Bacchas (talk | contribs) (Created page with "== Form Events== <pre> $(function() { 'use strict'; $('#name2').on('click', nameClick); function nameClick() { $(this).css('background-color', 'blue');...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Form Events

$(function() {
    'use strict';
    $('#name2').on('click', nameClick);

    function nameClick() {
        $(this).css('background-color', 'blue');
    }

    $('#frmContact').on('submit', function(event) {
        // pevents the default submit action from happening
        event.preventDefault();
    });
});

Back To Top< — >Category< — > Home