Solved
Is there a code for the drag and drop questions so respondents are dragging words into an image?
Is there a code for the drag and drop questions so respondents are dragging words into the image rather than a box below it?
Thanks!
Best answer by Anonymous
Hello @Jane ,
Paste the below code in the drag and drop question js(onready) option:
jQuery("#"+ this.questionId+" td.groupsContainerTd > div > div > h2 ").hide();
jQuery("#"+ this.questionId+" td.groupsContainerTd > div:eq(0) > div ").css({'border':'none', "background-image":"url(http://pluspng.com/img-png/lion-hd-png--2800.png)",'background-repeat': 'no-repeat',
' background-attachment': 'fixed',
'background-position': 'center','background-size':'contain' });
jQuery("#"+ this.questionId+" td.groupsContainerTd > div:eq(1) > div ").css({'border':'none', "background-image":"url(https://media.indiedb.com/images/games/1/14/13306/goat_rend1.png)",'background-repeat': 'no-repeat',
' background-attachment': 'fixed',
'background-position': 'center','background-size':'contain'});
jQuery("#"+ this.questionId+" td.groupsContainerTd > div:eq(2) > div ").css({'border':'none', "background-image":"url(http://www.pngall.com/wp-content/uploads/2016/05/Nature-PNG-HD.png)",'background-repeat': 'no-repeat',
' background-attachment': 'fixed',
'background-position': 'center' ,'background-size':'contain'});
Replace the url with your own image url
Output of the above code:!
Please find the qsf file for better understanding
View original
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.