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
#ajax can be any form ID or class name. I just use ajax | |
$('form#ajax').on('submit', function(){ | |
var that = $(this), | |
url = that.attr('action'), | |
type = that.attr('method'), | |
data = {}; | |
that.find('[name]').each(function(index, value){ | |
var that = $(this), | |
name = that.attr('name'), |
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
// Youtube tutorial here: https://youtu.be/LDgPTw6tePk | |
// These functions are designed to be exported, but you could create a class instead. See tutorial video. | |
// #1 proper case | |
export const properCase = (string) => { | |
return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`; | |
}; | |