Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Centering "No Answer" Radio Button Option

Centering "No Answer" Radio Button Option 11 Monate 7 Stunden her #101282

  • abryenton
  • abryentons Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 8
  • Karma: 0
Hi everyone,

I'm trying to center the radio buttons on a Array (flexible labels). There doesn't seem to be a class attached to them.

Any ideas?

haedcc02.jpg
Letzte Änderung: 11 Monate 7 Stunden her von abryenton.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Centering "No Answer" Radio Button Option 11 Monate 14 Stunden her #101294

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4207
  • Dank erhalten: 791
  • Karma: 360
In LS 2.0, that <td> element has a class "noanswer-item".
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Centering "No Answer" Radio Button Option 11 Monate 13 Stunden her #101296

  • abryenton
  • abryentons Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 8
  • Karma: 0
We are currently using Limesurvey 1.87.

How would I go about adding that class to that element in this version?

Thanks!
Aaorn
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Centering "No Answer" Radio Button Option 11 Monate 12 Stunden her #101297

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4207
  • Dank erhalten: 791
  • Karma: 360
I can't test on a version that old but try adding this to the end of template.js:

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function() { 
		$('.array-flexible-row input.radio[value=""]').closest('td').addClass('noanswer-item');  
    });
</script>
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Centering "No Answer" Radio Button Option 11 Monate 12 Stunden her #101299

  • abryenton
  • abryentons Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 8
  • Karma: 0
That's awesome!! Thank you so much!

It didn't work in the template.js so I just added it to the startpage.pstpl and it worked great!

Thanks again!
Aaron
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Centering "No Answer" Radio Button Option 11 Monate 12 Stunden her #101300

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4207
  • Dank erhalten: 791
  • Karma: 360
Oops, sorry, my mistake - you don't need the enclosing <script> tags in template.js.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Centering "No Answer" Radio Button Option 11 Monate 11 Stunden her #101302

  • abryenton
  • abryentons Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 8
  • Karma: 0
Not a problem, thanks again for the help! Much appreciated. :)
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.129 Sekunden
Donation Image