Created
August 11, 2016 21:05
-
-
Save hirejordansmith/4c216f8fc30b0cce9efb12bc09fec04b to your computer and use it in GitHub Desktop.
Replace AJAX Spinner with Custom Spinner
This file contains hidden or 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
| /* | |
| hourglass.gif replaces the default AJAX spinner | |
| http://loading.io/ <- Good place to find a new one | |
| */ | |
| body img.gform_ajax_spinner { | |
| position: fixed !important; | |
| z-index: 999999; | |
| left: 0; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| display: block !important; | |
| overflow: hidden !important; | |
| width: 100% !important; | |
| height: 100% !important; | |
| background-color: rgba(255, 255, 255); /* fall back */ | |
| background-color: rgba(255, 255, 255, 0.7); | |
| background-image: url('images/hourglass.gif'); /* path to your new spinner */ | |
| background-repeat: no-repeat; | |
| background-size: 194px 194px; | |
| background-position: center center; | |
| } |
This file contains hidden or 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
| <?php | |
| // Make sure to create a transparent images 1 x 1 and upload to themes images folder | |
| add_filter("gform_ajax_spinner_url", "spinner_url", 10, 2); | |
| function spinner_url($image_src, $form){ | |
| return get_stylesheet_directory_uri() . '/images/one-pixel.png' ; // relative to you theme images folder | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment