Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@rxnlabs
rxnlabs / js-gravityform-save-multistep.js
Last active July 7, 2022 12:29
WordPress - Save and submit a multistep form using Gravity Forms. Multistep forms don't allow you to submit the form if the user decides to leave before completing the form. This allows the user to submit the form at any step.
//clone the form submit button for the form
var save_btn = jQuery('#gform_submit_button_2').clone();
//change the label of the midway submit button
save_btn.val('Save and Submit');
//get the ID of the gravity form
var gravity_form = jQuery('#gform_submit_button_2').closest('form');
var gravity_form_id = gravity_form.attr('id');
gravity_form_id = gravity_form_id.split("_");
gravity_form_id = gravity_form_id[1];
//get the last page of the form