Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vfontjr/2d5bd62289c3a04b43f7fdae3a8bf4be to your computer and use it in GitHub Desktop.
Save vfontjr/2d5bd62289c3a04b43f7fdae3a8bf4be to your computer and use it in GitHub Desktop.
<script>
jQuery(document).ready(function($) {
"use strict";
/* add "display: grid" to field's div.frm_opt_container
* change frm_field_1142_container to the id of your field's container
*/
$('div#frm_field_1142_container > div.frm_opt_container').css('display', 'grid');
/* loop through each radio button to assign it to a grid column
* change wild card selector [id^="frm_radio_1142-"] to the id
* of your radio button input's parent div
*/
var ctr = 1;
$('div[id^="frm_radio_1142-"]').each( function() {
$(this).css( 'grid-column', ctr );
ctr++;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment