How to right align poll/form field labels using javascript?

Answer: Add a javascript widget using the system and paste in the following code below.  Note that the javascript has to run within the browser for the right alignment to occur so you must be in preview mode or logged out to see the right justified field names.  This javascipt code block requires the javascript library or package jQuery to run but this resource is already included in the Talkspot system pages so there is no action required in that regard.
 
 
<script>
// right align poll widget field names
$(document).ready(function() {
    // aligns the questions or field labels to the right
    $(".TS-Question").each(function(i) {
        // added ':nth-child(1)' to avoid check-box mis-alignment and select box pushed to the right
        $(this).children('div:nth-child(1)').css("text-align", "right");
        $(this).children('div:nth-child(1)').css("padding-right", "7px");
    });
});
</script>
 
 

Add Feedback