Skip to content

Instantly share code, notes, and snippets.

@jhogervorst
jhogervorst / jQuery.Mobile.ajaxUpload.js
Last active January 1, 2016 15:49
Function to easily submit forms with file uploads using AJAX in jQuery Mobile.
/*
* jQuery.ajaxEnvironment.js
* https://gist.github.com/jhogervorst/8166217
*
* jQuery.Mobile.ajaxUpload.js
* https://gist.github.com/jhogervorst/8166385
*
* Copyright (C) 2013 Jonathan Hogervorst. All rights reserved.
* This code is licensed under MIT license.
*/
@jhogervorst
jhogervorst / jQuery.ajaxEnvironment.js
Last active January 1, 2016 15:48
Semi-elegant function to change jQuery's default AJAX settings ($.ajaxSetup) within a certain block of code.
/*
* jQuery.ajaxEnvironment.js
* https://gist.github.com/jhogervorst/8166217
*
* Copyright (C) 2013 Jonathan Hogervorst. All rights reserved.
* This code is licensed under MIT license.
*/
(function($) {
$.ajaxEnvironment = function(settings, block) {
@jhogervorst
jhogervorst / jquery.mobile.black-sidebar-theme-readme.md
Last active December 11, 2015 06:19
jQuery Mobile Black Sidebar Theme (for Panels) — Compatible (tested) with jQuery Mobile 1.3.0 (Beta)

Usage

Load this (custom) CSS before the jQuery Mobile CSS, otherwise some styles will not be applied correctly!

Example

 
@jhogervorst
jhogervorst / gist:3360855
Created August 15, 2012 15:01
Smaller font in jQuery Mobile 1.2.0 Alpha
/**
* This code makes all 16px texts in jQuery Mobile 14px.
*
* It's based on the CSS of jQuery Mobile 1.2.0 Alpha
* (by searching for occurrences of "font-size: 16px"
* and adding the found selectors to the list below).
*
* The size of the titles in navigation bars remains 16px
* Want those at 14px as well? Uncomment the parts below.
**/
@jhogervorst
jhogervorst / jqm_red_theme.css
Last active October 8, 2015 05:38 — forked from ryankirkman/jqm_red_theme.css
jQuery Mobile Red Theme — Compatible (tested) with jQuery Mobile 1.2.0 and 1.3.0 (Beta)
/* F - Red Theme for jQuery Mobile
* Available on: https://gist.github.com/3286492
* Extended from: https://gist.github.com/1117705 (older version!)
-----------------------------------------------------------------------------------------------------------*/
.ui-bar-f {
border: 1px solid #a60000 /*{a-bar-border}*/;
background: #f00 /*{a-bar-background-color}*/;
color: #fff /*{a-bar-color}*/;
font-weight: bold;
@jhogervorst
jhogervorst / Introduction.md
Created June 5, 2012 13:56
jQuery Validation Plugin Regexes for PHP

I was struggling to get jQuery Validation Plugin's regexes working with PHP, to make the server side validation behave exactly the same as the client side validation. I got it working after some hours (and much frustration), so I'd like to share it with all of you!

The regexes are modified versions of the regexes included in jQuery Validation Plugin 1.9.0.