Welcome, Guest
Username: Password: Remember me

TOPIC: dynaminc SGQA

dynaminc SGQA 3 years 8 months ago #56216

  • sig_block
  • sig_block's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hi,
i need to make a script available to an entire groups of questions. This script works on answer ids (i.e on their SGQA codes).

is there a way to refer to the actual SGQA,
for having something like (e.g. for the answer 11448X7X1423sq26):
var this.QQ = ??? 
 
if ($( '#answer11448X7X'+this.QQ+'sq26' ).attr('checked') == false ) {
	$( '#question'+this.QQ+' li:eq(62)' ).hide();
	$( '#answer11448X7X'+this.GQ+'a29' ).attr('checked', false);
}

thanks

gL
Last Edit: 3 years 8 months ago by sig_block. Reason: wrong code
The administrator has disabled public write access.

Re: dynaminc SGQA 3 years 8 months ago #56221

  • sig_block
  • sig_block's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
I found this solution
it dipends on the question-type.
e.g. for the multiple option question:
 
var QQ=$('.multiple-opt').attr('id').replace(/question/,'');
 
That is: i just take the id (removing the word "question") of the div with the class ".multiple-opt".
Anyone has a better solution?
Last Edit: 3 years 8 months ago by sig_block.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.183 seconds
Donation Image