Skip to content

Instantly share code, notes, and snippets.

View ThomasPickering's full-sized avatar
🏠
Working from home

Thomas Pickering ThomasPickering

🏠
Working from home
View GitHub Profile
@ThomasPickering
ThomasPickering / ajax-form.js
Created September 27, 2022 09:54 — forked from havvg/ajax-form.js
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@ThomasPickering
ThomasPickering / BootstrapAlert.php
Last active January 18, 2022 13:27 — forked from rpmahoney/BootstrapAlert.php
PHP functions to create Bootstrap 3 Alerts
<?php
/**
* Create a bootstrap
* @param String $bold - First words in the alert. Will be put inside <strong> html tag for emphasis
* @param String $level - second words in the alert. Will be put inside <class> html tag for alert severity
* @param String $message - What will be used for the main description in the alert
*/
function Alert($bold, $level, $message)
{